alpine-nginx-php/rootfs/etc/nginx/conf.d/default.conf

42 lines
865 B
Text
Raw Permalink Normal View History

2015-11-08 18:58:38 +00:00
server {
listen 80;
listen [::]:80 default ipv6only=on;
2015-11-08 18:58:38 +00:00
root /var/www;
index index.php;
2015-11-08 18:58:38 +00:00
# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
2015-11-08 18:58:38 +00:00
# Add stdout logging
2015-11-08 18:58:38 +00:00
error_log /dev/stdout info;
access_log /dev/stdout;
2015-11-08 18:58:38 +00:00
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
2015-11-08 18:58:38 +00:00
location ~ \.php$ {
2015-11-08 18:58:38 +00:00
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2015-11-08 18:58:38 +00:00
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
2015-11-08 18:58:38 +00:00
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
expires 5d;
}
# deny access to .* files, for security
location ~ /\. {
log_not_found off;
deny all;
}
2015-11-08 18:58:38 +00:00
}
# vim: set ft=nginx: