server {
charset utf-;
client_max_body_size 128M;
#listen ; ## 监听 ipv4 上的 端口
#listen [::]: default_server ipv6only=on; ## 监听 ipv6 上的 端口
server_name go.etcchebao.com;
location / {
try_files $uri @backend;
}
#location /(css|js|fonts|img)/ {
# access_log off;
# expires 1d;
# root "/path/to/app_b/static";
# try_files $uri @backend;
#}
location @backend {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8181;
}
# 若取消下面这段的注释,可避免 Yii 接管不存在文件的处理过程()
#location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
# try_files $uri =;
#}
#error_page /.html;
#location ~ /\.(ht|svn|git) {
# deny all;
#}
}