Self hosting requires a computer and an Internet connection that's on most of the time, some software (webserver and probably a database and other stuff), an account with one of the dynamic address service providers (such as No-IP and DynDNS), and last but not least: lots of free time.
In each of the following posts in this series, I'll present a specific type of website: a plain static website, Foxmarks bookmarks server (WebDAV), Gallery2 (multi-site), WordPress, Gitweb, and a CUPS proxy site.
I'm no webmaster - my experience in web hosting is limited to what I've done in the past year and half, which isn't much. Nevertheless, it's work that begs to be documented. Please don't be shy: corrections and suggestions are welcome!
I'll start with a plain static website, so as to demonstrate the steps needed to install it. I'm using Apache2 as my webserver - the default on a Debian system (if it's not installed, just type aptitude install apache2 as root).
- create a directory (or a symlink to a directory): /var/www/plain
- create a file /var/www/plain/index.html:
- create a new configuration file /etc/apache2/sites-available/plain with the following contents:
<VirtualHost *:80>(I've marked in red a fictitious No-IP domain and webmaster e-mail address - please replace with your own stuff).
CustomLog /var/log/apache2/access.log vhost_combined
- enable the new website:
- reload the webserver:
- the new site should be accessible at http://example.no-ip.com (fake! fake! fake!)
- the new site can be disabled with the following sequence:
- Virtual Hosts: other similar sites with different server names can be similarly installed by modifying the ServerName property. The webserver will serve web pages according to the server name used in the URL being accessed - all from the same IP address.
- if you're getting the following message every time the server is reloaded or restarted:
Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerNamejust add the following line to /etc/apache2/httpd.conf
- SECURITY: better safe than sorry...
It's your serve(r) now.