The nginx proxy access is not effective

There are deprecations related to your environment variables. Please take the recommended actions to update your configuration:

  • N8N_BLOCK_ENV_ACCESS_IN_NODE → The default value of N8N_BLOCK_ENV_ACCESS_IN_NODE will be changed from false to true in a future version. If you need to access environment variables from the Code Node or from expressions, please set N8N_BLOCK_ENV_ACCESS_IN_NODE=false. Learn more: Security environment variables | n8n Docs
  • N8N_GIT_NODE_DISABLE_BARE_REPOS → Support for bare repositories in the Git Node will be removed in a future version due to security concerns. If you are not using bare repositories in the Git Node, please set N8N_GIT_NODE_DISABLE_BARE_REPOS=true. Learn more: Security environment variables | n8n Docs

[license SDK] Skipping renewal on init: license cert is not initialized
Registered runner “JS Task Runner” (u2q86iUSzUQeGUsUbiWR4)
Version: 1.118.1

Editor is now accessible via:
http://localhost:5678/n8n location /n8n {
proxy_pass http://****:8678/n8n;
include proxy.conf;

      #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_set_header Upgrade $http_upgrade;
      proxy_set_header Connection 'upgrade';
      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_cache_bypass $http_upgrade;
    } 

d5dab2765ac5 myn8n:latest “tini – /docker-ent…” 17 minutes ago Up 17 minutes 0.0.0.0:8678->5678/tcp, :::8678->5678/tcp Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.

Hey @jiangpeng663 !

If you want to access in the browser your n8n UI at the address :

‘http://****:8678/n8n’

You need to add in your env file the variables

‘N8N_PATH=/n8n’

‘N8N_EDITOR_BASE_URL=http(s)://your-domain/n8n’

And your

Should have addition trailing slash(/) to your proxy_pass and location.

‘location /n8n/ { proxy_pass http://:8678/;’

But if you want to open n8n at root / remove /n8n from the Nginx location and proxy_pass, and don’t set N8N_PATH (or set it to /).

Cheers!