Workflow URL access issue

Describe the issue/error/question

Not able to access a workflow url directly. for e.g. https://n8n.sample.in/workflow/31.
same issue with execution: https://n8n.sample.in/workflow/20/executions/93738 doesn’t work.

What is the error message (if any)?

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]:

Hi @samirsahu, welcome to the community. I’m not quite sure what your issue is. Do you maybe have some more details as to what your error is exactly? Or maybe an example?

on clicking View button for an execution opens new page with message “Cannot GET /workflow/20/executions/93738”
in network tab error code is 404.
same for workflow as well but I can open workflow from the list of workflows but not when I directly open the link “https://n8n.sample.in/workflow/31

seems like an issue with nginx config but I am not sure what is the issue.

server {
	root /var/www/html;

	# Add index.php to the list if you are using PHP
	index index.html index.htm index.nginx-debian.html;
    server_name n8n.*; # managed by Certbot

    listen [::]:443 ssl; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/n8n.sample.in/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/n8n.sample.in/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    location ~ ^/rest/push$ {
       proxy_pass https://localhost:5678;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       proxy_http_version 1.1;
       chunked_transfer_encoding off;
       proxy_buffering off;
       proxy_cache off;
       add_header 'Access-Control-Allow-Origin' '*';
       add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
    }
    location ~ / {
        proxy_pass http://localhost:5678;
    }
    access_log off;
    error_log /var/log/nginx/error.log;
    #return 404; # managed by Certbot

}

Hey @samirsahu,

Have you tried simplifying your nginx config? There are a few examples in other posts of what it should look like, it might be worth starting there and then adding more options to it.

yes, nginx got complex after I started trying everything possible to get it running.
in network tab many times I get 404 for https://n8n/workflows/demo

Nginx is not the issue.
@Jon what else could be the problem?

Hi @samirsahu,

What makes you think nginx is not the issue? I have done a quick check on a local instance I have here with nginx being used as a reverse proxy and I can confirm that both work but I have not tested your nginx config as I assume you have it set up like that for a reason.

The config I am using which I know works is below, Can you give that a go and see if it works for you?

server {
    listen 443 ssl;
    server_name n8n.domain.tld;
    location / {
        proxy_pass http://127.0.0.1:5678;
        proxy_set_header Connection '';
        proxy_http_version 1.1;
        chunked_transfer_encoding off;
        proxy_buffering off;
        proxy_cache off;
    }
    ssl_certificate /etc/letsencrypt/live/n8n.domain.tld/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/n8n.domain.tld/privkey.pem; # managed by Certbot
}

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.