Skip to content

Instantly share code, notes, and snippets.

@aih
Last active December 4, 2019 19:41
Show Gist options
  • Select an option

  • Save aih/47fd080d6bfaab71e6e9d112dccf0104 to your computer and use it in GitHub Desktop.

Select an option

Save aih/47fd080d6bfaab71e6e9d112dccf0104 to your computer and use it in GitHub Desktop.
Nginx configuration for House-Posey2-UI
upstream nodeservice {
server 127.0.0.1:8091;
}
server {
listen 4200 default_server;
listen [::]:4200 default_server;
server_name localhost;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
root /Users/arihershowitz/Documents/workspace/Xcential/House-Posey2-UI/dist;
}
location /nodeservices {
rewrite /nodeservices/(.*) /$1 break;
proxy_pass http://nodeservice;
}
location = /mongodb/ {
return 302 /mongodb/;
}
location /mongodb/ {
rewrite ^/mongodb/(.*) /$1 break;
proxy_pass http://127.0.0.1:8007$uri$is_args$args;
proxy_redirect off;
}
# redirect server error pages to the static page /40x.html
#
error_page 404 /404.html;
location = /40x.html {
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment