44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
|
server {
|
||
|
listen 80 default_server;
|
||
|
listen [::]:80 default_server ipv6only=on;
|
||
|
|
||
|
root /usr/share/nginx/html;
|
||
|
index index.html index.htm index.php;
|
||
|
|
||
|
# Make site accessible from http://localhost/
|
||
|
# server_name localhost;
|
||
|
|
||
|
location / {
|
||
|
# First attempt to serve request as file, then
|
||
|
# as directory, then fall back to displaying a 404.
|
||
|
try_files $uri $uri/ =404;
|
||
|
# Uncomment to enable naxsi on this location
|
||
|
# include /etc/nginx/naxsi.rules
|
||
|
}
|
||
|
|
||
|
#error_page 404 /404.html;
|
||
|
|
||
|
# redirect server error pages to the static page /50x.html
|
||
|
#
|
||
|
#error_page 500 502 503 504 /50x.html;
|
||
|
#location = /50x.html {
|
||
|
# root /usr/share/nginx/html;
|
||
|
#}
|
||
|
|
||
|
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||
|
#
|
||
|
location ~ \.php$ {
|
||
|
try_files $uri =404;
|
||
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||
|
fastcgi_index index.php;
|
||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||
|
include fastcgi_params;
|
||
|
}
|
||
|
|
||
|
# deny access to .htaccess files, if Apache's document root
|
||
|
# concurs with nginx's one
|
||
|
#
|
||
|
#location ~ /\.ht {
|
||
|
# deny all;
|
||
|
#}
|
||
|
}
|