Defcon-1-Logo

           [Home]    [FBSD Articles]    [Scripts Corner]    [Contribute]    [Search]    [FBSD Links]    [Files]

About Us

FreeBSD Articles
  *Hardware
  *Networking
  *Security
  *Software
  *X Windows


Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks


FreeBSD Links

Articles in other
Languages :
  *French Articles
  *Spanish Articles

Want to Help ?
 
   Click Here

Email Users5

Search:
 

 


FreeBSD Search:


 

 

Powered-By-Apache-Logo

Setting up Virtual Domains in FreeBSD / Apache

 Well with several question in the channel, and just general questions on this topic, figured I would sit down and write something... 

1. Modify the httpd.conf that is located in /usr/local/etc/apache you will need to enter the following information for a standard virtual domain :

Below is a section of the httpd.conf :

<VirtualHost 199.3.90.22>
ServerName freebsd.org
ServerAlias freebsd.org *.freebsd.org
DocumentRoot /usr/home/freebsd/public_html/
ScriptAlias /freebsd-cgi-bin/ "/usr/home/freebsd/pubic_html/cgi-bin/"
ErrorLog /var/log/www/freebsd.com-error.log
TransferLog /var/log/www/freebsd.com-access.log
</VirtualHost>

 ====================] END [===========================

 Once you have then modified the httpd.conf you then need to refire apache to make the changes take affect. To do this, do the following command:

                 /usr/local/sbin/apachectl restart

2. In the /etc/namedb we need to make a new .db file. We now need to edit and modify the named.conf thats located in /etc/namedb. In the named.conf
you need to have something that looks like this for this virtuals.

===================] Top [=============================
zone "freebsd.org" {
    type master;
    file "freebsd.db";
};

===================] END [============================

3. Now Kill -HUP named  if you dont know how to do this, you need to type
 "top" and look for the PID for named, once you get the number for example:

70197 root      2  0 2552K 1160K select 1  3:16 0.00% 0.00% named

we would type "kill -HUP 70197" which would restart the named daemon.

GhostRdr
 

Email Us

ghostrdr@defcon1.org

This site cannot be duplicated without permission

© 1998 - 2010 Defcon1, www.defcon1.org. Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.