nginx中phpcms的配置信息
2024-03-21 本文已影响0人
Mracale
server {
listen 80;
server_name dev1.025nj.com;
#access_log /var/log/nginx/host.access.log main;
root /usr/share/nginx/html/dev1;
index index.php index.html index.htm;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}