-
Notifications
You must be signed in to change notification settings - Fork 490
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
Accessing the webui behind a proxy #95
Comments
this is important to get right. i suspect changes to go-ipfs are necessary On Fri, Nov 20, 2015 at 7:02 PM Suraj Ravichandran notifications@github.com
|
Has there been any change since last year that makes it possible to access the webui via a reverse proxy? I have tried with apache, the page redirects and loads but no data from the node is shown. For information, I'm running ipfs as a docker container with its port 5001 exposed on the host as 127.0.0.1:5001, then I set up a reverse proxy with apache in a VirtualHost listening on my.ip.add.ress:5001. (Previous tries with domain names were also unsuccessful). |
My current workaround without opening to the world the port from the server where ipfs is running is using SSH port forwarding like this:
and then accessing from my computer at It's working but still looking to avoid having to open a SSH connection and using a reverse proxy. |
There's also problems if you're trying to put HTTPS in front of the UI via nginx. It loads fine, but then the web-ui immediately tries to access it's own content via HTTP rather then HTTPS and is blocked. |
Moreover, Geolocation API is not working for non-localhost non-https origins (https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only). How can I set up a HTTPS proxy in this case ? I have tried without success. |
Closing in favour of #836 |
Hi, I have a server with my basic webapp being served via nginx.
Now I have installed ipfs and want to add a
/ipfsui
proxy target which would take me to the webui for ipfs, thus I made the following additions to my existing fowardproxy in nginx.confNow I can go to the ipfs ui by going to
http://my_server_ip/ipfsui
which properly redirects me tohttp://my_server_ip/ipfs/hash_here/#/
However, the page has no relevant ipfs info (like my peer id and so on).
Then I went on to inspect the console error messages and found:
After looking up these error lines I came to the conclusion that the code in page.jsx (which has since changed in the main webui git repo, link: https://github.com/ipfs/webui/blob/master/js/views/page.jsx, but not changed so as it would overcome this problem of mine) determines the ipfs api url and port from
window.location.host
andwindow.location.port
.This is the snippet of the webapp that that I currently get served (via ipfs of course):
(you can see where the code failed to
split
and tracedback from this snippet and the error above)I know that not everyone will be running this behind a proxy and also that I can temp fix via making the ipfs api listen on
0.0.0.0
by setting it viaipfs config ...
but want to ask if there is anby other way to get around my current problem before I embark on that path.The text was updated successfully, but these errors were encountered: