Results 1 to 1 of 1
I have setup apache webserver on RHEL5 working fine for months now. Next task is to add another domain name to the webserver using the same IP address. I have ...
- 06-16-2011 #1Just Joined!
- Join Date
- Jun 2011
- Posts
- 1
RHEL5 apache name based virtual host now working
I have setup apache webserver on RHEL5 working fine for months now. Next task is to add another domain name to the webserver using the same IP address. I have been trying to set up apache name based virtual host for the past several days without success. I always get the main page on the browser or elinks. I just doing testing first on /etc/hosts.
10.145.13.10 sales.example1.com sales # Main page
10.145.13.10 tours.example1.com # 2nd domain name
I have tried googling, search forum, and read documentation. I have checked my httpd.conf file several times but there must be some simple step or config error that i might miss
Apache version is 2.2.3. Output of my httpd.conf file:-
NameVirtualHost *:80
# Default Virtual Host
<VirtualHost *:80>
ServerName sales.example1.com
DocumentRoot /var/www/html
DirectoryIndex index.html index.shtml index.php
</VirtualHost>
<VirtualHost *:80>
ServerName tours.example1.com
DocumentRoot /var/www/virtual/tours
ErrorLog /var/log/httpd/tours_error_log
CustomLog /var/log/httpd/tours_access_log common
DirectoryIndex index.html index.shtml
<Directory "/var/www/virtual/tours/">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


Reply With Quote