upstream admin.backend {
server 127.0.0.1:801;
server 192.168.0.101:801;
fair;
}
server {
listen 80;
server_name admin.ssss.com.cn;
location / {
proxy_pass
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
access_log /var/log/nginx/admin_up.log main;
}
server {
listen 801;
server_name admin.backend.com;
set $www_root /home/web/mgt/htdocs;
location / {
root $www_root;
index index.html index.htm index.php;
autoindex on;
}
location ~ \.php$ {
root $www_root;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $www_root$fastcgi_script_name;
include fastcgi_params;
}
# access_log /var/log/nginx/admin_bk.log main;
access_log off;
}
阅读(255) | 评论(0) | 转发(0) |