events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; upstream backend { server 172.18.0.4:8000; } server { listen 80; server_name _; location /api/ { rewrite ^/api/(.*) /$1 break; proxy_pass http://backend/; 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; } location /h5/ { proxy_pass http://backend; 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; } location /ws/ { proxy_pass http://backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; 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_read_timeout 86400s; } location /itdesk/ { alias /usr/share/nginx/html/itdesk/; index index.html; try_files $uri /itdesk/index.html; } location /itagent/ { alias /usr/share/nginx/html/itagent/; index index.html; try_files $uri /itagent/index.html; } location /itadmin/ { alias /usr/share/nginx/html/itadmin/; index index.html; try_files $uri /itadmin/index.html; } location /itportal/ { alias /usr/share/nginx/html/itportal/; index index.html; try_files $uri /itportal/index.html; } location / { proxy_pass http://10.80.0.130: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_set_header X-Forwarded-Proto $scheme; } } }