worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { server { listen 80; index index.php; set $host_path "/var/www/html"; include /etc/nginx/mime.types; root /var/www/html; server_name localhost; charset utf-8; location / { try_files $uri /index.php?$args; } location ~ ^/(protected|framework|themes/\w+/views) { deny all; } location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ { try_files $uri =404; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(.*)$; try_files $uri index.php; include fastcgi_params; fastcgi_index index.php; fastcgi_pass limesurvey:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; } } }