activated php-fpm for default nginx conf
This commit is contained in:
@@ -41,7 +41,7 @@ server {
|
||||
root /var/www/html;
|
||||
|
||||
# Add index.php to the list if you are using PHP
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
index index.html index.htm index.nginx-debian.html index.php;
|
||||
|
||||
server_name _;
|
||||
|
||||
@@ -52,22 +52,30 @@ server {
|
||||
}
|
||||
|
||||
# pass PHP scripts to FastCGI server
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# include snippets/fastcgi-php.conf;
|
||||
#
|
||||
# # With php-fpm (or other unix sockets):
|
||||
# fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
|
||||
# # With php-cgi (or other tcp sockets):
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
#}
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
## Images and static content is treated different
|
||||
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
|
||||
access_log off;
|
||||
expires max;
|
||||
}
|
||||
|
||||
location ~ /(libraries|setup/frames|setup/libs) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ server {
|
||||
## Images and static content is treated different
|
||||
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
expires max;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
|
Reference in New Issue
Block a user