Created
May 21, 2019 03:27
-
-
Save lukaszewczak/039999a0f9b31cbeebba29704cbc4fb7 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
| upstream api_node_js { | |
| server 127.0.0.1:4000; | |
| } | |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| root /var/www/webapp/dist; | |
| index index.html; | |
| access_log /var/log/nginx/webapp.access.log; | |
| error_log /var/log/nginx/webapp.error.log; | |
| location / { | |
| try_files $uri $uri/ =404; | |
| } | |
| location /auth/ { | |
| proxy_pass http://api_node_js; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection 'upgrade'; | |
| proxy_set_header Host $host; | |
| proxy_cache_bypass $http_upgrade; | |
| } | |
| location /api/ { | |
| proxy_pass http://api_node_js; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection 'upgrade'; | |
| proxy_set_header Host $host; | |
| proxy_cache_bypass $http_upgrade; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment