server { listen 80; server_name _; root /usr/local/aipo/tomcat/webapps/aipo/; location ~ "^(/aipo/themes/|/aipo/images/|/aipo/images/|/aipo/javascript/)" { root /usr/local/aipo/tomcat/webapps; } location / { try_files $uri @aipo; } location @aipo { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffers 4 32k; client_max_body_size 8m; client_body_buffer_size 128k; } }