Created
October 10, 2019 22:11
-
-
Save aebian/937fd8a128692898247f9d5c2d29bf10 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 80; | |
server_name crm-portal.server.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
include includes/ssl-cert-gw.conf; | |
include includes/ki-ssl-base.conf; | |
server_name crm-portal.server.com; | |
set $upstream 127.0.0.1:8443; | |
location = / { | |
return 301 https://$server_name/crm/client-zone; | |
} | |
location ~ /nms { | |
return https://$server_name/crm/client-zone; | |
} | |
location / { | |
proxy_pass https://$upstream; | |
proxy_redirect https://$upstream https://server_name; | |
proxy_cache off; | |
proxy_store off; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
proxy_read_timeout 36000s; | |
proxy_set_header Host $http_host; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
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_set_header Referer ""; | |
client_max_body_size 4G; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 80; | |
server_name unms-01.server.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
include includes/ssl-cert-gw.conf; | |
include includes/ki-ssl-base.conf; | |
server_name unms-01.server.com; | |
set $upstream 127.0.0.1:8443; | |
location ~ /crm/client-zone { | |
return 301 https://crm-portal.server.com; | |
} | |
location / { | |
proxy_pass https://$upstream; | |
proxy_redirect https://$upstream https://$server_name/; | |
proxy_cache off; | |
proxy_store off; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
proxy_read_timeout 36000s; | |
proxy_set_header Host $http_host; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
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_set_header Referer ""; | |
client_max_body_size 4G; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment