server {
#監(jiān)聽端口
listen 80;
#白名單和黑名單的功能
allow all;
#指定響應(yīng)編碼
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;
#監(jiān)控模塊
#location /my {
# stub_status;
# }
#虛擬主機的網(wǎng)站根目錄
root /work/wirk/work/public;
#虛擬主機默認訪問的網(wǎng)頁
index index.php index.html;
#替換內(nèi)容
# 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;
}
}