runtime/examples/php/nginx.conf

29 lines
676 B
Nginx Configuration File
Raw Permalink Normal View History

2020-02-02 21:06:11 +00:00
server {
listen 0.0.0.0:8000;
listen [::]:8000;
root /srv/app;
index index.php index.html;
port_in_redirect off;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/srv/run/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
#location /static/ {
# alias /srv/static/;
#}
}