6

I am trying to experiment with running my blog as a hidden service. I am using debian on a vps to host my blog. I am using apache2 run as user www-data.

I had to chown /var/www/wordpress to debian-tor to get the private key and hostname created. This broke my clearnet facing blog so I chowned it back to www-data. How do I deal with the fact that both tor and my webserver want to own the webroot? I tried adding debian-tor to www-data group and vice versa but no luck. Sorry if my english is bad.

torrc

HiddenServiceDir /var/www/wordpress
HiddenServicePort 80 127.0.0.1:80

Apache listen port 80

tor log:

warn /var/www/wordpress is not owned by this user (debian-tor but by www-data) perhaps you are running tor as wrong user
warn error loading rendezvous service keys
err set_options() Bug: Acting on config options left us in a broken state

1 Answer 1

2

The Tor Hidden Service dir should not be set to the same directory as your web root (it contains your private key among other things, which you don't want to serve up on your website)

Use a separate directory that is only accessible by your Tor user. Eg.

HiddenServiceDir /var/lib/tor/myblog/
HiddenServicePort 80 127.0.0.1:80

and then be sure to set some appropriate permissions:

chown -R debian-tor:debian-tor /var/lib/tor/myblog/
2
  • Thank you. I feel very stupid now for some reason I was thinking the HS dir had to be webroot.
    – uighur1984
    Mar 23, 2014 at 16:35
  • No worries; it happens. If this solved your problem don't forget to mark it as the answer so others will know that it worked. Thanks for using Tor.SE!
    – user5
    Mar 23, 2014 at 17:54

You must log in to answer this question.

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