Serving a Domain from Red-Bean ============================== :author: bbum@mac.com .. contents:: Register domain and configure DNS --------------------------------- * register a domain somewhere. http://joker.com/ seems to be fairly popular * point primary DNS of domain to ns.red-bean.com (216.127.237.131) * grab secondary DNS service from somewhere (OnShore or http://www.twisted4life.com/index.php both offer free secondary DNS) and point it to the primary DNS server * create a **db.domain.com** file in **/etc/bind/**. It should contain something like the following (^friday^yourdomain throughout). Also, make sure and put in the correct secondary DNS entry and update the serial number):: | ;;; bbum@mac.com owns this domain | friday.com. IN SOA sanpietro.red-bean.com. cmpilato.red-bean.com. ( | 2005062200 ; serial format: yyyymmdd## | 3600 ; refresh | 900 ; retry | 604800 ; expire | 3600 ) ; minimum TTL | | IN A 66.146.194.200 | IN NS ns.red-bean.com. | IN NS ns1.twisted4life.com. |;;; |localhost IN A 127.0.0.1 |www IN A 66.146.194.200 |;end * add an entry for your domain in named.conf. Note the *allow-transfer* entry pointing to the secondary DNS server:: | // friday.com, fryday.com, bumgarner.com, bbum.net | // Contact: Bill Bumgarner | zone "friday.com" { | type master; | file "db.friday.com"; | allow-transfer { | 202.157.185.115; | }; | } * HUP named to cause it to re-read named.conf (make sure it is still running after doing this):: | sudo killall -s 1 named Configure apache for the new domain/site ---------------------------------------- * add an entry like the following for the new domain to **/etc/apache/virtualhosts.conf**:: | ###################################################################### | ### Ask bbum@mac.com | | ServerName www.friday.com | ServerAlias friday.com | ServerAdmin bbum@mac.com | DocumentRoot /www/friday/ | ErrorLog /usr/local/apache2/logs/friday-error_log | TransferLog /usr/local/apache2/logs/friday-access_log | | AllowOverride All | | | ###################################################################### * use apachectl to verify the virtual host configuration prior to restarting apache:: | /usr/local/bin/apache/apachectl -S * create the document root for your server. Note that the group and set-gid bit are not required, but useful. There will be subdirectories of the WordPress install that must be group writable:: | sudo mkdir /www/friday | sudo chown bbum:www-data /www/friday | sudo g+ws /www/friday * restart apache and verify that you can hit the new web site. Note that it may take a bit for DNS to propagate