Current File : /home/inlingua/www/decay_sym/root/var/softaculous/apps/nginx/common.template |
# Redirect server error pages to the static pages
error_page 500 502 504 /500.html;
location = /500.html {
root /usr/local/apps/nginx/etc/conf.d;
internal;
}
error_page 404 /404.html;
location = /404.html {
root /usr/local/apps/nginx/etc/conf.d;
internal;
}
error_page 497 /497.html;
location = /497.html {
root /usr/local/apps/nginx/etc/conf.d;
internal;
}
error_page 555 /555.html;
location = /555.html {
root /usr/local/apps/nginx/etc/conf.d;
internal;
}
location @maintenance {
root /usr/local/apps/nginx/etc/conf.d;
rewrite ^(.*)$ /noindex.html break;
}
# Pass the INDEX.PHP script to FastCGI server listening on 127.0.0.1:9178
location = / {
fastcgi_read_timeout 3600;
try_files $uri /index.php /index.html @maintenance;
fastcgi_pass sock_path
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}
# For userdir files
location ~* ^/~(.+?)(/.*\.php)$ {
alias /home/$1/public_html$2;
fastcgi_pass sock_path
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
# For userdir files
location ~ ^/~(.+?)(/.*)?$ {
alias /home/$1/public_html$2;
index index.html index.htm index.php;
autoindex on;
}
# To catch index.php by default
location ~ (index.php|/)$ {
fastcgi_read_timeout 3600;
try_files $uri $uri/index.php $uri/index.html;
fastcgi_pass sock_path
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}
# Pass the regular PHP scripts to FastCGI server listening on 127.0.0.1:9179
location ~ \.php$ {
fastcgi_read_timeout 3600;
try_files $uri =404;
fastcgi_pass sock_path
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}
location ~ \.pl|cgi$ {
try_files $uri =404;
gzip off;
fastcgi_pass 127.0.0.1:8999;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}