ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

I get some "POST 404 (Not Found)" when I deploy the webui in production

Open maooricio opened this issue 8 years ago • 5 comments

Hi, I followed all the guidelines to deploy property this helpful tool. When I make it in my local machine, all works fine. But when I try to deploy the same in a production server, it shows me some 404 errors that I don't understand why.

Here is my ipfs config file (the important lines):

"API": { "HTTPHeaders": { "Access-Control-Allow-Credentials": [ "true" ], "Access-Control-Allow-Methods": [ "HEAD", "PUT", "GET", "POST" ], "Access-Control-Allow-Origin": [ "*" ] } },

"Addresses": { "API": "/ip4/127.0.0.1/tcp/5001", "Gateway": "/ip4/127.0.0.1/tcp/8080", "Swarm": [ "/ip4/0.0.0.0/tcp/4001", "/ip6/::/tcp/4001" ] },

"Gateway": { "HTTPHeaders": { "Access-Control-Allow-Headers": [ "X-Requested-With", "Range" ], "Access-Control-Allow-Methods": [ "GET" ], "Access-Control-Allow-Origin": [ "*" ] }, "PathPrefixes": [], "RootRedirect": "", "Writable": false },

Here is my nginx config file (the important lines, in order to set the proxypass):

server { listen 80; server_name gorillafirma.com;

location /ipfsui { proxy_pass http://127.0.0.1:5001/webui/; 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; }

location /ipfs { proxy_pass http://127.0.0.1:5001; 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; } }

So, when I try to deploy the URL, http://208.68.36.4/ipfsui. I have getting this:

image

As you can see I am getting some 404 Errors that i don't understand. Taking into account that 208.68.36.4 is the IP for the gorillafirma.com domain

maooricio avatar Mar 08 '18 16:03 maooricio

It looks like you are trying to expose API port (5001) under /ipfs/ subresource on a public website. This will not work. Exposing API port to the internet is very bad idea, as it gives everyone full control over your node and that is why WebUI is hardcoded to only work with localhost URLs.

See previous discussions at:

lidel avatar Mar 12 '18 10:03 lidel

Any updates on this @maooricio?

hacdias avatar Mar 20 '18 21:03 hacdias

@hacdias and @lidel, thanks for your answer. the truth is that I read a lot about the documentation and I realize that the thing that I want to achieve is complicated. In this recent days I bought an ssl certificate in order to make secure my site and at least I have got the node info live in my site and the files that I upload trough IPFS (that was a really good advance), but now I am getting an error that says: "Please use a browser with webcrypto support". So I am started to search where is the source code inside the 5001 port, maybe if I get the source code I can make some changes in order to get more information. In conclusion, I am working on it yet, and I for sure I post here any updates of my success or my failure

maooricio avatar Mar 20 '18 22:03 maooricio

This is an issue for many of us. I am VPN'ing through the server on which IPFS is running.

See #594 for my comments, and another person with a parallel issue, #628.

DiagonalArg avatar Apr 28 '18 13:04 DiagonalArg

Closing in favour of https://github.com/ipfs-shipyard/ipfs-webui/issues/836

olizilla avatar Sep 27 '18 15:09 olizilla