$ wget http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz $ tar zxvf thttpd-2.25b.tar.gz $ sudo ./configure && make $ mkdir hidserv; cd hidserv $ cd ..
$ ./thttpd -p 5222 -h localhost
Turning the Web Server into a Hidden Service
This works with Tor or I2P. In case of Tor, enter your configuration file:
$ cd /etc/tor $ vi torrc
### This section is just for location-hidden services ##
And add the following lines under that:
HiddenServiceDir /home/username/hidden_service/ HiddenServicePort 80 127.0.0.1:5222
Username is the name you log into on your Linux box with, hidden_service is whatever name you wish to give it.
Restart Tor. When it starts back up, it reads the file torrc, follows the instructions, and bootstraps your service into the Tor network.
It will then automatically create the 'hiddenservice' directory that you specified, and it will create two files there, privatekey and hostname.
The private key is identical to the idea of GPG. The hostname is a URL created by the network used to identify you from other services, it should look something like uy4htf7ssvv3gfh8g.onion.