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 http://ejemplohtml.pasosdeJesus.org is for that distribution: ! 1. Prepare webpage(s) First I choose a server to host the website and login for example: ssh sn2.pasosdeJesus.org then I prepare an accesible directory and put there the HTML pages, the main one should be called 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 http://dhobsd.pasosdejesus.org/index.php?id=Webmaking+101+world ! 2. Prepare webserver
I edit the configuration of the webserver ( <!VirtualHost 201.245.63.134:80 127.0.0.1:80> !ServerAdmin vtamara@pasosdeJesus.org !DocumentRoot /var/www/htdocs/ejemplohtml/ !ServerName ejemplohtml.pasosdeJesus.org !ErrorLog logs/pasosdeJesus-error_log !CustomLog logs/pasosdeJesus-access_log common </!VirtualHost> After that I restart the webserver sudo apachectl stop sudo sh /etc/rc.local If needed I can look for errors in !3. Prepare DNS I login to the main DNS server for ejemplohtml IN A 201.245.63.134 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: dig @sn1.pasosdeJesus.org ejemplohtml.pasosdeJesus.org I can see also log errors in Finally I propagate the change by logging into slave DNS server, deleting the copy of the zone ( !4. Ready After this immeadiatly I can visit: http://ejemplohtml.pasosdeJesus.org –I have improved the version posted there. |