upstream calculation_weapp { server 127.0.0.1:7005; } server { listen 80; server_name jluat.cal.com; charset utf-8; access_log /var/log/nginx/jluat_cal_access.log; error_log /var/log/nginx/jluat_cal_error.log; client_max_body_size 100m; proxy_connect_timeout 60s; proxy_send_timeout 60s; proxy_read_timeout 60s; location / { proxy_pass http://calculation_weapp; 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_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_request_buffering off; } location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { proxy_pass http://calculation_weapp; 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_set_header X-Forwarded-Proto $scheme; expires 30d; add_header Cache-Control "public, immutable"; } }