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

}

?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容