Results 1 to 4 of 4
I've tried to create 3 NameVirtualHost(s) on apache2 server of RHEL5.
the configuration file:
Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName site1
DocumentRoot /var/www/html/site1
</VirtualHost>
<VirtualHost *:80>
ServerName site2
DocumentRoot /var/www/html/site2
...
- 11-15-2008 #1Just Joined!
- Join Date
- Sep 2005
- Location
- China
- Posts
- 37
[SOLVED] How to increase the maximum sites of NameVirtualHost in apache2?
I've tried to create 3 NameVirtualHost(s) on apache2 server of RHEL5.
the configuration file:
The BIND9 service is ok. I've bind these 3 sites to the same IP address already. And I'm sure there's no problem with my NS server.Code:NameVirtualHost *:80 <VirtualHost *:80> ServerName site1 DocumentRoot /var/www/html/site1 </VirtualHost> <VirtualHost *:80> ServerName site2 DocumentRoot /var/www/html/site2 </VirtualHost> <VirtualHost *:80> ServerName site3 DocumentRoot /var/www/html/site3 </VirtualHost>
The problems is I can only access the last 2 sites (site2 & site3) via domain name. When I type the site1 address in the browser, it brings me to the default DocumentRoot folder (e.g. /var/www/html/). How to override this limit? Do not suggest me to use IP virtual host or port virtual host, because I have 1 IP address only.
- 11-15-2008 #2
name based virtual hosts - Google Search
is anything showing up in the logs? that looks correct. you may want to use fqdn for server name and then shortname as a server alias.
- 11-16-2008 #3Just Joined!
- Join Date
- Nov 2008
- Posts
- 2
The issue is not related to any limits. Rather this looks to me like some minute config related error.
Does the server name of the global configuration and server name of the first virtual host match ? If so that could be the issue.
- 12-20-2008 #4Just Joined!
- Join Date
- Sep 2005
- Location
- China
- Posts
- 37



