upstream tomcat {
server localhost:8080;
}
server {
listen 8090;
server_name localhost;
access_log off;
root channel;
location ~* \.(css|js) {
expires 1y;
}
location /Channel/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://tomcat;
}
location / {
expires -1;
try_files $uri $uri/ /index.html =404;
}
}
server localhost:8080;
}
server {
listen 8090;
server_name localhost;
access_log off;
root channel;
location ~* \.(css|js) {
expires 1y;
}
location /Channel/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://tomcat;
}
location / {
expires -1;
try_files $uri $uri/ /index.html =404;
}
}