Skip to content

Instantly share code, notes, and snippets.

@ramsunvtech
Created January 10, 2021 10:49
Show Gist options
  • Save ramsunvtech/842c431567ce8bc8303bc1a7b7f2c7fa to your computer and use it in GitHub Desktop.
Save ramsunvtech/842c431567ce8bc8303bc1a7b7f2c7fa to your computer and use it in GitHub Desktop.
Nginx Microfrontend Configuration
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