Tested on Ubuntu 12.04 Precise and suited for a home, virtual or dedicated server.
An Isolating Proxy, where the webserver can not find out it's own external IP address and can only connect through Tor, is always preferred. ([https://www.whonix.org Whonix] is an Isolating Proxy.) Due to the design of Isolating Proxies you need more RAM compared to installing a hidden service directly. If you are going for a virtual or [http://www.webhostingreviewsx.co.uk/best-dedicated-server-hosting-uk/ dedicated server], RAM is money. The more RAM the more you have, the more you have to pay per month. This guide is about installing a hidden service directly and preventing IP leaks by correctly configuring everything. However, this guide will also work for Isolating Proxies.
= Install required software =
{{{
sudo apt-get install php5-cgi mediawiki lighttpd
}}}
= Remove apache =
Just to be sure.
{{{
sudo apt-get remove apache*
}}}
= Check you have no mailsend installed =
A non-torified mail send could de-anonymize the server. Look if something like sendmail is installed and manually uninstall if it is the case.
{{{
dpkg -l | grep mail
}}}
= lighttpd.conf =
{{{
sudo nano /etc/lighttpd/lighttpd.conf
}}}
{{{
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_fastcgi"
)
# Not required. We use standard path /var/www/wiki.