0

I am trying to setup a hidden service for my public website and thus would like to use port 80 for both tor and nginx. Is it possible on a single host with one public IP address?

In other words, I am looking for a reverse proxy to demux traffic from Tor and plaintext Web into tor and nginx respectively.

1
  • 1
    So you want to access your website at both mywebsite[.]com:80 and sdfgdsfghs[.]onion:80? If so you don't need any kind of reverse proxy, see the HiddenServicePort option.
    – Steve
    May 25, 2020 at 8:28

1 Answer 1

2

You have a simple nginx webserver and it is listening on http port 80 for mywebsite.com.

You set up tor to also listen externally on virtual port 80 as a onion service for mywebsiteabcxyz.onion.

This can all live on the same web server at the same time. No reverse proxy is required. The key is that tor will always listen for a virtual onion service port and the communicate with nginx on the real port 80. The tor daemon does that translation for you. Both real world and onion users will see the same content.

Please also see my answer here. If you share one server with Tor and with an external site, either your Tor users will be redirected to links in the external site or the external users will be redirected to links in the onion site.

If you are planning on a simple html website, that might be OK for you. If you are planning on using a CMS, it gets more complication and you will want to consider running two websites in parallel.

1
  • I didn't know the concept of virtual ports, thanks! May 25, 2020 at 9:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .