alpine-nginx-php/rootfs/etc/nginx/conf.d/default.conf
Knut Ahlers 8cb66e3f43
Re-vamp container
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-09-11 13:19:52 +02:00

41 lines
865 B
Nginx Configuration File
Executable file

server {
listen 80;
listen [::]:80 default ipv6only=on;
root /var/www;
index index.php;
# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
# Add stdout logging
error_log /dev/stdout info;
access_log /dev/stdout;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
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;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
expires 5d;
}
# deny access to .* files, for security
location ~ /\. {
log_not_found off;
deny all;
}
}
# vim: set ft=nginx: