Created
October 19, 2017 10:32
-
-
Save TheSirop/b59f050eccd0422928a3d68f91224985 to your computer and use it in GitHub Desktop.
Nginx server configuration for subdomains
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
| upstream project { | |
| server 127.0.0.1:3000; | |
| } | |
| server { | |
| listen 80; | |
| server_name mysite.com; | |
| location / { | |
| proxy_pass http://project; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host mysite.com; | |
| } | |
| } | |
| server { | |
| listen 80; | |
| server_name subdomain.mysite.com; | |
| location / { | |
| proxy_pass http://project; | |
| proxy_http_version 1.1; | |
| proxy_set_header Host subdomain.mysite.com; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment