All pastes #405583 Raw Edit

t

public text v1 · immutable
·published 2007-03-21 20:56 UTC
rendered paste body
STEP 1: ADD THIS TO YOUR HTTPD.CONF AT THE VERY BOTTOM:

Include /etc/apache2/virtualhosts.conf

Include /etc/apache2/virtualhosts/*.conf


STEP 2: mkdir /etc/apache2/virtualhosts/

STEP 3: create /etc/apache2/virtualhosts.conf file with the following:
-- start --
# virtualhosts.conf file for virtual web hosting customers

<Directory "/home">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<Directory "/websites">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


NameVirtualHost *:80

-- end --

STEP 4: create a virtualhost in the /etc/apache2/virtualhosts/ directory for your web site:
I have created: /etc/apache2/virtualhosts/lab.whatever.com.conf
NOTE: you need the .conf on the end because the include in the httpd.conf looks for all the files in virtualhosts directory that end in .conf

-- start /etc/apache2/virtualhosts/lab.whatever.com.conf --
<VirtualHost *:80>
   DocumentRoot /websites/lab.whatever.com/
   ServerName lab.whatever.com
   ServerAdmin support@whatever.com
   LogFormat combined
   ErrorLog /var/log/httpd/lab.whatever.com-error.log
   TransferLog /var/log/httpd/lab.whatever.com.log
   HostNameLookups off
   <Directory "/websites/lab.whatever.com">
      Options All
      AllowOverride All FileInfo
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>


-- end --