added php support

This commit is contained in:
2022-04-12 18:56:44 +00:00
parent 95c24321c3
commit 3427c97256
3 changed files with 18 additions and 9 deletions

View File

@@ -35,7 +35,7 @@ server {
#access_log /var/log/nginx/host.access.log main;
location / {
root /var/www;
root /var/www/html;
index index.html index.htm;
}
@@ -56,13 +56,13 @@ server {
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
location ~ \.php$ {
root html;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one