Re: A little off subject

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 24 October 2004 09:32 am, Joe Borne wrote:
> Can anyone point me to a good howto, for hosting multiple websites on
> a single linux box with a single IP? I'd prefer something
> Fedora-centric (Server runs Fed-Core-2 Final)

First off.. multiple web sites per single IP is called "Name Based Hosting" 
and is a part of the HTTP 1.1 standard (i.e. been around a while).

Here's a basic example of the apache httpd.conf section showing how this might 
be used.. 

<shameless plug>
This is taken directly from my new book...
The Linux Troubleshooting Bible:
http://www.amazon.com/exec/obidos/ASIN/076456997X/
</shameless plug>

;)

	NameVirtualHost 10.1.1.1
	
	#
	# VirtualHost example:
	# Almost any Apache directive may go into a VirtualHost container.
	# The first VirtualHost section is used for requests without a known
	# server name.
	#
	#<VirtualHost *:80>
	#    ServerAdmin webmaster@xxxxxxxxxxxxxxxxxxxxxx
	#    DocumentRoot /www/docs/dummy-host.example.com
	#    ServerName dummy-host.example.com
	#    ErrorLog logs/dummy-host.example.com-error_log
	#    CustomLog logs/dummy-host.example.com-access_log common
	#</VirtualHost>
	
	<VirtualHost 10.1.1.1>
	    DocumentRoot /var/www/html/
	    ServerName mydomain.com
	</VirtualHost>
	
	<VirtualHost 10.1.1.1>
	    DocumentRoot /home/bob/web/html/
	    ServerName example.com
	    ServerAlias *.example.com
	    CustomLog /home/bob/web/logs/example.com-access_log common
	</VirtualHost>
	
But as the other guy said... look at your apache installs build in docs:
	http://127.0.0.1/manual
(from the apache server locally of course)

and specifically for name based hosting (more than one site per IP):
	http://127.0.0.1/manual/vhosts/name-based.html

Cheers,
	
Tweeks



[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]