nginx配置

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

}

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容