Created
January 27, 2018 19:21
-
-
Save mrngm/01b7e1875a52ce88e43337d7f5e743fa to your computer and use it in GitHub Desktop.
Proxy wildcard domains to another port
This file contains 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
server { | |
listen [::]:80; | |
server_name ~^(.+)$; | |
location / { | |
proxy_pass_request_headers on; | |
proxy_pass_request_body on; | |
proxy_set_header Host $http_host; | |
proxy_http_version 1.1; | |
proxy_redirect off; | |
proxy_pass http://127.0.0.1:81$request_uri; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment