美文网首页
nginx配置

nginx配置

作者: LeftJoin | 来源:发表于2018-02-06 00:36 被阅读0次

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;
}

}

相关文章

网友评论

      本文标题:nginx配置

      本文链接:https://www.haomeiwen.com/subject/baswzxtx.html