nginx配置
2018-02-06 本文已影响0人
LeftJoin
server {
#监听端口
listen 80;
#白名单和黑名单的功能
allow all;
#指定响应编码
charset utf-8;
#域名
server_name a.gotophp.cn;
#项目单独访问日志
# include /etc/nginx/conf.d/logformat.conf;
# access_log /usr/record/log/nginx/pmix.access.log main;
#监控模块
#location /my {
# stub_status;
# }
#虚拟主机的网站根目录
root /work/wirk/work/public;
#虚拟主机默认访问的网页
index index.php index.html;
#替换内容
# sub_filter '<p class="note">PHP' 'Python';
#php文件由fpm解析
location ~ \.php($|/) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#限制git,svn管理
location ~ .*.(svn|git|cvs) {
deny all;
}
}