server { listen *:80; server_name survey.maylug.org www.maylug.virtual www; set $maintenance "off"; if ($maintenance = "on") { return 503; } index index.php index.html; access_log /var/log/nginx/limesurvey/access.log combined; error_log /var/log/nginx/limesurvey/error.log; location ~ \.php$ { root /srv/www/limesurvey; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_connect_timeout 3m; fastcgi_index index.php; fastcgi_read_timeout 3m; fastcgi_send_timeout 3m; fastcgi_split_path_info ^(.+\.php)(/.+)$; } location / { root /srv/www/limesurvey; try_files $uri $uri/ =404; } }