You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hy-screen-2.0/nginx.conf

115 lines
3.8 KiB

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location = /admin {
return 302 /#/admin/users;
}
location /admin/ {
proxy_pass http://hy-v3-openapi:9999/openApi/admin/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 5s;
proxy_read_timeout 30s;
}
location = /login {
proxy_pass http://hy-v3-openapi:9999/login;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /logout {
proxy_pass http://hy-v3-openapi:9999/logout;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /getInfo {
proxy_pass http://hy-v3-openapi:9999/getInfo;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /auth/status {
proxy_pass http://hy-v3-openapi:9999/auth/status;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /openApi/screen2/smart-management/artifact/html {
proxy_pass http://hy-v3-openapi:9999;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 5s;
proxy_send_timeout 115s;
proxy_read_timeout 115s;
}
location /openApi/ {
proxy_pass http://hy-v3-openapi:9999;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_connect_timeout 5s;
proxy_read_timeout 30s;
}
location /geoserver/ {
proxy_pass http://hy-v3-geoserver:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 5s;
proxy_read_timeout 60s;
}
location /external/satellite/ {
proxy_pass http://hy-v3-openapi:9999/openApi/screen2/external/satellite/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 5s;
proxy_read_timeout 20s;
proxy_cache v3_tiles;
proxy_cache_key "satellite:$uri";
proxy_cache_valid 200 1d;
proxy_cache_valid 502 503 30s;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
add_header X-V3-Proxy-Cache $upstream_cache_status always;
}
location /external/reference/ {
proxy_pass http://hy-v3-openapi:9999/openApi/screen2/external/reference/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 5s;
proxy_read_timeout 20s;
proxy_cache v3_tiles;
proxy_cache_key "reference:$uri";
proxy_cache_valid 200 1d;
proxy_cache_valid 502 503 30s;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
add_header X-V3-Proxy-Cache $upstream_cache_status always;
}
location = /index.html {
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
}
location / {
try_files $uri $uri/ /index.html;
}
}