1

I know that to create more sites in Tor I add HiddenServiceDir and HiddenServicePort to my etc/tor/torrc file but how do I edit it in my server to listen to all of them and do I need to create new index.html files for the other sites?

I am using Nginx on Ubuntu.

1 Answer 1

3

You need to add a server entry in your Nginx config file for each service. For example, with two hidden services your config file might look something like:

server {
    listen   127.0.0.1:<port_hidden_service_1>;

    root /path/to/hidden_service_1/;
    index_1 index_1.html index_1.htm;

    server_name domain_1.onion;
}

server {
    listen   127.0.0.1:<port_hidden_service_2>;

    root /path/to/hidden_service_2/;
    index_2 index_2.html index_2.htm;

    server_name domain_2.onion;
}

You might have some additional config fields in there, but you get the idea.

For reference, see the Nginx server name config documentation.

3
  • Thanks for the help! When I do this and create 3 different sites, I am unable to connect to any of them through the tor browser or localhost on a normal internet. Is there a way to fix that?
    – theintern
    Jul 29, 2015 at 15:48
  • Did you originally manage to get a single hidden service to work, before you added the others? Jul 29, 2015 at 16:17
  • Yes, I was able to get to my site through the localhost and the tor browser
    – theintern
    Jul 29, 2015 at 16:54

You must log in to answer this question.

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