Skip to content

Instantly share code, notes, and snippets.

@joshp23
Last active September 21, 2021 01:39
Show Gist options
  • Save joshp23/23fc49e3b1ed11efcac0082d2241314b to your computer and use it in GitHub Desktop.
Save joshp23/23fc49e3b1ed11efcac0082d2241314b to your computer and use it in GitHub Desktop.
Ergo Node Interface behind NGINX

Ergo Node Interface behind NGINX.

In Ergo's application.conf file:

  1. set scorex.restApi.bindAddress = 127.0.0.1:9053 note that 127.0.0.0/8 works here
  2. set network.bindAddress = 0.0.0.0:9030
  3. set network,declaredAddress = X.X.X.X where X.X.X.X is the external, public IP

In NGINX's config for the Ergo Node Interface

server {
    listen 443 http2 ssl;
    listen [::]:443 http2 ssl;
    server_name ergo.example.com;

    ## Here is the bug fixing line
    underscores_in_headers on;

    ## SSL settings
    ssl_certificate /etc/letsencrypt/live/ergo.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ergo.example.com/privkey.pem;

    location / {
         proxy_pass http://127.0.0.1:9053/;
    }

    access_log /var/log/nginx/ergo.access.log combined;
    error_log /var/log/nginx/ergo.error.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment