Thanks to God I have my own web servers as well as name servers that I use for hosting webpages. They run OpenBSD adJ, so the following example to setup is for that distribution:

! 1. Prepare webpage(s)

First I choose a server to host the website and login for example:


then I prepare an accesible directory and put there the HTML pages, the main one should be called index.html :

cd /var/www/htdocs/
mkdir ejemplohtml
cd ejemplohtml
vi index.html

and edit the webpages, with my prefered editor vim I use the example described at

! 2. Prepare webserver I edit the configuration of the webserver (/var/www/conf/httpd.conf) to include a new !VirtualHost:

    !DocumentRoot /var/www/htdocs/ejemplohtml/

    !ErrorLog logs/pasosdeJesus-error_log
    !CustomLog logs/pasosdeJesus-access_log common

After that I restart the webserver

sudo apachectl stop
sudo sh /etc/rc.local

If needed I can look for errors in /var/log/service and /var/www/logs/

!3. Prepare DNS

I login to the main DNS server for, and edit the domain zone /var/www/master/ to add the subdomain associated with the IP address of (that is

ejemplohtml     IN      A

And then I increase the serial number at the beginning of file (I prefer to use the date and a serial):

2012011001 ; Serial

Then restart the DNS server:

sudo pkill named
sudo sh /etc/rc.local

I test from another computer by doing:


I can see also log errors in /var/log/messages and /var/log/service

Finally I propagate the change by logging into slave DNS server, deleting the copy of the zone (/var/named/slave/ and restarting named.

!4. Ready

After this immeadiatly I can visit: –I have improved the version posted there.