资源说明:server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
# 静态页面目录
root E:\workSpace\本地静态资源;
# 默认首页
index index.html;
location = / {
index login.html index.html index.htm;
}
# 用户浏览器端的缓存设置
location ~* \.(css|js|jpg|jpeg|gif|png|swf|htm|html|json|xml|svg|woff|ttf|eot|map|ico|woff2|apk)$ {
proxy_cache_valid 200 304 4h;
expires 4h;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
location /app/ {
# 动态页面,交给tomcat处理
proxy_pass http://127.0.0.1:8080;
}
location / {
# 动态页面,交给tomcat处理
proxy_pass http://192.168.2.66:8080;
}
}
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。