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

Nginx reverse proxy:Invalid origin: https://domain.com #2208

Closed
TheresaQWQ opened this issue Sep 27, 2019 · 11 comments
Closed

Nginx reverse proxy:Invalid origin: https://domain.com #2208

TheresaQWQ opened this issue Sep 27, 2019 · 11 comments

Comments

@TheresaQWQ
Copy link

Step 1: Please describe your environment

  • ZeroNet version: latest
  • Operating system: Ubuntu 18.04.3 LTS
  • Web browser: Chrome
  • Tor status: not available
  • Opened port: yes
  • Special configuration: ____

https is work, but websocket console display Invalid origin: https://domain.com

@TheresaQWQ
Copy link
Author

Chrome console

@purplesyringa
Copy link
Contributor

Have you added https://domain.com or domain.com to ui_host configuration key?

@purplesyringa
Copy link
Contributor

@TheresaQWQ Did that help?

@ghost
Copy link

ghost commented Oct 14, 2019

I would use Apache if I'm you. @imachug I'm sure that your suggestion not worked. Actually you need two server to proxy from clearnet to ZeroNet. One is where zeronet is running and you need to unset the headers which added by ZeroNet. This server should accept incoming connections only from the front-end server on port 80 and forward it to 43110.

On the front-end you should redirect port 80 to 443 and proxy that to the back-end server xx.xx.xx.xx:80 here you can set headers!

I think this issue related to that he proxy request to xx.xx.xx.xx:43110/raw/example.bit

In any case the back-end server should only download the site from your local machine where you update and sign everything over tor! Do not use the back-end to publish/update your sites!

@purplesyringa
Copy link
Contributor

Why would you need two servers? Can't you just make the ZeroNet instance listen on port 80 publically?

@ghost
Copy link

ghost commented Oct 14, 2019

@imachug @HelloZeroNet You need two server because one removes the headers added by ZeroNet and the other adding new ones. Not to mention that is safer!

I currently proxy on the front-end example.org:443 to "backendip-xx.xx.xx.xx:80/raw/BitcoinAddress". -FIREWALL- The back-end listens on port 80 and forwards it to 43110. Works perfectly. No sandbox whatsoever... Caching however... you know...

@ghost
Copy link

ghost commented Oct 15, 2019

@TheresaQWQ Try using Apache and as I said do not publish on the Proxy back-end! Only use your local machine preferably with Tor on and in Tor Browser. I checked around and find that you MUST create a new site by command line zeronet.py siteCreate! Put your files into your new "BitcoinAddress" and than zeronet.py siteSign. MANUALLY! After this open the site using your proxy which will also download that. Again, do not use the back-end to create/clone sites!

This was referenced Oct 15, 2019
@purplesyringa
Copy link
Contributor

@HelloZeroNet Can this be closed?

@HelloZeroNet
Copy link
Owner

Yes, using apache/nginx is the recommended way to setup.
(It would be great if someone could add it to the faq with some example config)

@purplesyringa
Copy link
Contributor

Is "Is it possible to install ZeroNet to a remote machine?" section the right place to update?

@HelloZeroNet
Copy link
Owner

HelloZeroNet commented Oct 23, 2019

I think it would be better to create a new section: "How can I run a public ZeroNet proxy?" and add a link to it to the "Is it possible to install ZeroNet to a remote machine?" section.

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

3 participants