Wotking nginx php-fpm conf
This commit is contained in:
parent
a5b5cd7f2b
commit
fb39c04690
@ -1,7 +1,6 @@
|
|||||||
user www-data;
|
user www-data;
|
||||||
worker_processes 4;
|
worker_processes 4;
|
||||||
|
|
||||||
|
|
||||||
events {
|
events {
|
||||||
worker_connections 1024;
|
worker_connections 1024;
|
||||||
}
|
}
|
||||||
@ -12,26 +11,21 @@ http {
|
|||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
sendfile on;
|
sendfile on;
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
gzip on;
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root html;
|
root /var/www/html;
|
||||||
index index.html index.php;
|
index index.html index.php;
|
||||||
try_files $uri $uri/ =404;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_pass unix:/var/run/php-fpm.sock;
|
||||||
try_files $fastcgi_script_name =404;
|
fastcgi_index index.php;
|
||||||
set $path_info $fastcgi_path_info;
|
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $path_info;
|
include fastcgi_params;
|
||||||
fastcgi_index index.php;
|
|
||||||
include fastcgi.conf;
|
|
||||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user