标签:pre lin webapp 配置 ati oca classes nginx 代理配置
nginx代理配置
server {
listen 80;
server_name web1.chbo.com;
location ~*\.(do|jsp)$ {
proxy_pass http://web1.chbo.com:8080;
#为后端服务器设置Real-IP参数
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
}
tomcat虚拟主机配置
<Host name="web1.chbo.com" appBase="/data/webapps/" unpackWARs="true" autoDeploy="true">
<Context path="" docBase="ROOT" reloadable="true">
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
deny="172\.16\.100\.100"/>
</Context>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="/data/logs"
prefix="web1_access_log" suffix=".txt"
pattern="%{X-Real-IP}i %l %u %t "%r" %s %b" />
</Host>
项目的目录结构:
[root@node01 data]# tree /data/
/data/
├── logs
│ ├── web1_access_log.2017-09-09.txt
│ └── web1_access_log.2017-09-10.txt
└── webapps
└── ROOT
├── classes
├── index.jsp
├── lib
├── META-INF
└── WEB-INF
标签:pre lin webapp 配置 ati oca classes nginx 代理配置
原文地址:http://www.cnblogs.com/chbo/p/7500206.html