The tor manual pages on setting up hidden services are very
well done: http://tor.eff.org/doc/tor-hidden-service.html
In addition to having tor/privoxy running, you will need to
install a web server. They recommended thttpd, which was just
the thing for me - very simple and fast.
They recommend using port 5222 for the server, but I was
delayed by this instruction:
<quote>
Step Three: Connect your web server to your hidden service
This part is very simple. Open up your torrc again, and change the HiddenServicePort line from "www.google.com:80" to "localhost:5222". Then restart Tor. Make sure that it's working by reloading your hidden service hostname in your browser.
</quote>
It's probably obvious, but to spell it out a little more, you
wnat to change the HiddenServicePort line to: 80 localhost:5222
You will also need to forward 80 and 5222 if you are behind a router.
The biggest problem I had was in setting the permissions correctly.
Linux is very fussy about permissions, rightly so, and it took me
awhile to get straight on them.
I set up the hidden services dirctory in /var/tor/hidserv/.
When I restarted Tor after making the necessary changes to its
conf file, hidserv contained the expected additional files (this
is all spelled out in the manual very clearly).
On my system, tor runs under a user called debian-tor, so when I
created /var/tor/hidserv, I set the owner and group to debian-tor.
thttpd defaults to a user of www-data. You have to go into its .conf
file, which is in /etc/thttpd/thttpd.conf on my system, and change
this little bit to be as shown:
<quote>
# user: userid
# Specified which user to switch after intialiazation when started as root.
# Default: www-data
user=debian-tor
</quote>
Then restart thttpd.
The only other thing I did was to create an index.html in /var/tor, which
is the home directory for thttpd.
When you start thttpd, your userid will be debian-tor.
To become debian-tor, open a terminal and type
su root
password when prompted
su debian-tor
then cd /var/tor
Then start thttpd. The command I used was /usr/sbin/thttpd -p 5222 -h localhost.
It's mentioned in the manual.
You have to start thttpd from /var/tor.
If anybody is running tor and cares to test my hidden web service, go to
http://3u2z5isd6vlkxmql.onion.
You should see a test page and a couple of test links. If you do test it, please
let me know the results. It works when I use my torrified browser, but it would
be good to know that others can see it as well.
Questions? Ask here.