Skip to content

Instantly share code, notes, and snippets.

@ufo22940268
Created July 18, 2021 12:39
Show Gist options
  • Select an option

  • Save ufo22940268/6585961e7d5a13b0d87475e7c8226008 to your computer and use it in GitHub Desktop.

Select an option

Save ufo22940268/6585961e7d5a13b0d87475e7c8226008 to your computer and use it in GitHub Desktop.

Revisions

  1. ufo22940268 created this gist Jul 18, 2021.
    64 changes: 64 additions & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,64 @@
    events {}

    http {
    proxy_max_temp_file_size 0;
    proxy_buffering off;
    error_log /tmp/nginx_error.log;
    access_log /tmp/nginx_access.log;

    upstream frontend {
    server 127.0.0.1:8080;
    }

    upstream node {
    server 127.0.0.1:5000;
    }

    upstream process {
    server 127.0.0.1:5001;
    }

    upstream graphql {
    server 127.0.0.1:3000;
    }

    server {
    listen *:9002;
    client_max_body_size 50M;

    location @fallback {
    proxy_pass https://gamma.compass.com;
    proxy_ssl_server_name on;
    }

    location ~ /ucfe-assets {
    proxy_pass https://gamma.compass.com;
    proxy_ssl_server_name on;
    }

    location / {
    proxy_pass http://localhost:9001;
    proxy_set_header Host $host;
    error_page 404 = @fallback;
    }
    }

    server {
    listen *:80;
    root /var/www/html;

    location @fallback {
    root /var/www/html/fallback/;
    }

    location / {
    root /var/www/html/fallback;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    error_page 404 = @fallback;
    }
    }
    proxy_hide_header Strict-Transport-Security;
    }