Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
maooricio opened this issue Mar 8, 2018 · 5 comments
Closed

Comments

@maooricio
Copy link

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

@lidel
Copy link
Member

lidel commented Mar 12, 2018

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:

@hacdias
Copy link
Member

hacdias commented Mar 20, 2018

Any updates on this @maooricio?

@maooricio
Copy link
Author

@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

@DiagonalArg
Copy link

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.

@olizilla
Copy link
Member

Closing in favour of #836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants