Create an additional host (another web site)
Submitted by chris on January 19, 2006 - 22:00.
httpd.conf & .htaccess
1) To setup Apache to listen on the new IP (port 80 the default HTTP port):
Listen 63.123.138.159:80
2) Define the "root" of the new IP-based web site.
<VirtualHost 63.123.138.159>
ServerName www.sitebuddy.dom
ServerAdmin FakeEmail@sitebuddy.dom
DocumentRoot E:/DomZeus/sitebuddycom/wwwroot
<Directory "E:/DomZeus/sitebuddycom/wwwroot">
# Options Indexes FollowSymLinks Includes ExecCGI This line is commented out
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
If running Apache under a restricted local account, make sure that account has the appropriate rights on the web content and log folders.
Note:
Listen Directive scope: server config
VirtualHost Directive scope: server config
Directory Directive scope: server config, virtual host (this means the Directory directive can be nested within the VirtualHost one).
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen
http://httpd.apache.org/docs/2.2/mod/core.html#virtualhost
http://httpd.apache.org/docs/2.2/mod/core.html#directory
Listen 63.123.138.159:80
2) Define the "root" of the new IP-based web site.
<VirtualHost 63.123.138.159>
ServerName www.sitebuddy.dom
ServerAdmin FakeEmail@sitebuddy.dom
DocumentRoot E:/DomZeus/sitebuddycom/wwwroot
<Directory "E:/DomZeus/sitebuddycom/wwwroot">
# Options Indexes FollowSymLinks Includes ExecCGI This line is commented out
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
If running Apache under a restricted local account, make sure that account has the appropriate rights on the web content and log folders.
Note:
Listen Directive scope: server config
VirtualHost Directive scope: server config
Directory Directive scope: server config, virtual host (this means the Directory directive can be nested within the VirtualHost one).
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#listen
http://httpd.apache.org/docs/2.2/mod/core.html#virtualhost
http://httpd.apache.org/docs/2.2/mod/core.html#directory


delicious
digg
reddit
google
technorati