Created
January 10, 2021 10:49
-
-
Save ramsunvtech/842c431567ce8bc8303bc1a7b7f2c7fa to your computer and use it in GitHub Desktop.
Nginx Microfrontend Configuration
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 { | |
ssi on; | |
proxy_intercept_errors on; | |
location /product-list { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_pass http://micro-frontend-app.com:3000/app/plp; | |
} | |
location /product-detail { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_pass http://micro-frontend-app.com:3000/app/pdp; | |
} | |
location /static { | |
alias /var/www/; | |
} | |
location / { | |
proxy_pass http://micro-frontend-app.com:3000/app; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment