[CentOS] CentOS 4.1 Apache
Dag Wieers
dag at wieers.comMon Jul 4 11:09:36 UTC 2005
- Previous message: [CentOS] CentOS 4.1 Apache
- Next message: [CentOS] root at localhost email problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 3 Jul 2005, Ben wrote:
> I did. Here's a snip:
> 
> NameVirtualHost xxx.xxx.xxx.xxx:80
> 
> <VirtualHost xxx.xxx.xxx.xxx:80>
>     DocumentRoot /www/svgeek
>     ServerName www.svgeek.com
> </VirtualHost>
> 
> <VirtualHost xxx.xxx.xxx.xxx:80>
>     DocumentRoot /www/bluesky
>     ServerName www.blueskyinnovations.com
> </VirtualHost>
> 
> <VirtualHost xxx.xxx.xxx.xxx:80>
>     DocumentRoot /www/bluesky
>     ServerName www.power-boot.com
> </VirtualHost>
You can simplify this setup like:
	NameVirtualHost xxx.xxx.xxx.xxx:80                                                             
	<VirtualHost xxx.xxx.xxx.xxx:80>                                                               
		DocumentRoot /www/svgeek                                                                   
		ServerName www.svgeek.com                                                                  
	</VirtualHost>                                                                                 
                                                                                              
	<VirtualHost xxx.xxx.xxx.xxx:80>                                                               
		DocumentRoot /www/bluesky                                                                  
		ServerName www.blueskyinnovations.com                                                      
		ServerAlias www.power-boot.com
	</VirtualHost>                                                                                 
Or if you want to consolidate a set of URLs to a single URL:
	NameVirtualHost *:80
	<VirtualHost *:80>
		ServerName dag.wieers.com
		DocumentRoot /var/www/dag.wieers.com/
	</VirtualHost>
	<VirtualHost *:80>
		ServerName dag.wieers.be
		ServerAlias www.dag.wieers.com www.dag.wieers.be
		Redirect Permanent / http://dag.wieers.com/
	</VirtualHost>
This way you prevent people bookmarking an older URL that might be out of 
use after some timeframe.
Tip: It's also much better for Google, since all links to your site will 
go to a unique location (not spread over different domains holding the 
same content).
Kind regards,
--   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]
  - Previous message: [CentOS] CentOS 4.1 Apache
- Next message: [CentOS] root at localhost email problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list