-
-
Save FreeFly19/54fddf4321bca0fab82d95c9e58f6714 to your computer and use it in GitHub Desktop.
nginx config for backend API and frontend SPA
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
# File path: /etc/nginx/sites-available/default | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
root /home/ubuntu/ProjectBravo/smartschool/dist; | |
location /api { | |
proxy_redirect off; | |
proxy_pass http://localhost:8080; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Authorization $http_authorization; | |
} | |
location / { | |
try_files $uri /index.html; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment