Created
April 23, 2018 08:57
-
-
Save tlaitinen/551873c75cd48eacbcabecda6aa3a3e7 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
| server { | |
| listen 80; | |
| server_name app.oma-domain.fi; | |
| root /var/www; | |
| location =/ { | |
| rewrite ^ https://app.oma-domain.fi$request_uri? permanent; | |
| } | |
| } | |
| server { | |
| listen 443 ssl; # managed by Certbot | |
| server_name app.oma-domain.fi; | |
| root /data/app-frontend/current; | |
| ssl_certificate /etc/letsencrypt/live/app.oma-domain.fi/fullchain.pem; # managed by Certbot | |
| ssl_certificate_key /etc/letsencrypt/live/app.oma-domain.fi/privkey.pem; # managed by Certbot | |
| include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
| location / { | |
| try_files $uri /index.html; | |
| } | |
| location /api/ { | |
| rewrite ^/api/(.*) /$1 break; | |
| proxy_pass http://localhost:3000; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment