nginx 虚拟机搭建设置配置文件
server{
charset utf-8;
client_max_body_size 128M;
listen 80;
server_name demo.com;
root /Users/playcrab/www/demo;
index index.php index.html;
access_log /Users/playcrab/logs/demo_access.log;
error_log /Users/playcrab/logs/demo_error.log;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9006;
try_files $uri =404;
}
location ~* /\. {
deny all;
}
}
posted on 2018-11-07 10:19 running-fly 阅读(378) 评论(0) 编辑 收藏 举报