I would like to setup 3 hidden services on the same computer with nginx.
My torrc looks like this:
DataDirectory /var/lib/tor
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
HiddenServiceDir /var/lib/tor/hidden_service1/
HiddenServicePort 80 127.0.0.1:8081
HiddenServiceDir /var/lib/tor/hidden_service2/
HiddenServicePort 80 127.0.0.1:8082
I have 3 files in /etc/nginx/sites-available:
- hidden_service
- hidden_service1
- hidden_service2
hidden_service:
server{
listen 127.0.0.1:80;
root /var/www/hidden_service/;
index index.html index.htm;
server_name xxxxx.onion;
}
hidden_service1:
server{
listen 127.0.0.1:8081;
root /var/www/hidden_service/;
index index.html index.htm;
server_name yyyyy.onion;
}
hidden_service2:
server{
listen 127.0.0.1:8082;
root /var/www/hidden_service/;
index index.html index.htm;
server_name zzzzz.onion;
}
Symbolic links are created between sites-available and sites-enabled.
The first hidden_service is working.But the other two are not connecting. I tried with different port number and tried with the same port number but no luck. What am I doing wrong?
Thank You in advance!
listen 127.0.0.1:80;
), which is the virtual port specified for all services in thetorrc
file. Have you tried changing this? (e.g.) Change the three target ports in thetorrc
to 8081, 8082, 8083 (but keep the virtual port as 80 for each of them), then change the Nginx config tolisten 127.0.0.1:8081
,listen 127.0.0.1:8082
,listen 127.0.0.1:83
. At the minute, the first entry in the Nginx config is catching everything because they all use the same virtual port. (I think... )