awesome-compose/nginx-php-mysql/proxy/conf
Joseph Barreca 98b90b1d49 Sample for nginx-php-mysql
Signed-off-by: Joseph Barreca <jbarrec.tech@gmail.com>
2021-03-26 16:36:17 -04:00

32 lines
655 B
Plaintext
Executable File

server {
location ~ /.well-known {
allow all;
}
location ~ /\.ht {
deny all;
}
root /var/www/html;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass backend:9000;
fastcgi_index index.php;
}
}