Nginx配置备份(3)
#user nobody;
worker_processes 1;
error_log logs/error.log;
error_log logs/error.log notice;
error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip压缩的方式来降低带宽使用和加快传输速度,也可以不使用
#gzip on;
server {
listen 80;
server_name 80; #随便取名
#charset koi8-r;
#access_log logs/host.access.log main;
location /vmp {
#root html; #配置静态资源目录
#index index.html index.htm;
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://swrl01.adayoge.com:8080/VMP/;
}
location / {
#root html; #配置静态资源目录
#index index.html index.htm;
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://swrm03.adayoge.com;
}
}
server {
listen 81;
server_name 81; #随便取名
#charset koi8-r;
#access_log logs/host.access.log main;
location /vmp {
#root html; #配置静态资源目录
#index index.html index.htm;
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://10.2.9.101:8080/VMP/;
}
location / {
#root html; #配置静态资源目录
#index index.html index.htm;
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://10.1.1.103:8090/BS4/Loginx.jsp;
}
}
}