httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Greenlees" <ja...@shaw.ca>
Subject Re: [users@httpd] Virtual Hosts ?
Date Thu, 02 Jan 2003 04:33:41 GMT


H. Carter Harris wrote:
> Thanks Owen; I think we are getting to what's behind door #2.

actually, I'm Jaqui, I just quoted Owen's post from another thread ;)
> 
> Here is the plan:  I am currently hosting about a dozen domains on an IIS
> server but I want to move them to apache and linux.  So, I will be hosting
> more than one domain.  IIS calls them host headers and processes them the
> same way apache does.
> 
> If I am understanding this correctly, I should be able to do this with a
> <VirtualHost> block for each domain and setting the ServerName to the domain
> name.  Apache is listening on 192.168.1.103:80 and should use the host
> header in each request to resolve to the correct directory on the linux box.
> 
> Though I didn't say it specifically, you read between the lines.  Later I
> will be moving a couple of other domains to the linux box as well and they
> will require certs.  Then I will add some public ip addresses and try to
> configure apache to handle some ip based virtual hosting for me as well.
> Everything I read tells me this is possible.
> 
yup, though you would need to specify a different port for each ssl 
cert. if you are using name based for thise sites, for the secure server 
you would have to specify a different port through the listen directive.

if ip based you wouldn't need to specify ports, though you would need to 
point apache to the certificate for each ip, in the virtual host 
definitions. it may be a good idea to use different ports even with ip 
based secure sites, to ensure no conflicts between them.


> I am really enjoying learning about apache and open source.  My goal right
> now is to get to where I can contribute back soon.  Thanks for your response
> ... it is appreciated.
> 
> 
> -----Original Message-----
> From: J. Greenlees [mailto:jaqui@shaw.ca]
> Sent: Wednesday, January 01, 2003 9:33 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Virtual Hosts ?
> 
> 
> from reading this thread, I can see that you are combining both name
> based and ip based virtual hosting. ( default is ip based )
> 
> the clearest description I have seen of both forms was from Owen Boyle.
> 
> "
> There are two ways you can go - depending on whether you want to declare
> many aliases for your IP in DNS...
> 
> (1) If you do not mind paying for many Domain-Names which resolve to
> your IP, then:
> 
> Use Name-based VirtualHosts, like this (assume your IP = 192.168.1.1 and
> your sites are called www.site1.com, www.site2.com etc..):
> 
> 	NameVirtualHost 192.168.1.1
> 
> 	<VirtualHost 192.168.1.1>
> 	  ServerName www.site1.com
> 	  DocumentRoot /home/site1/html
> 	  ... etc.
> 	</VirtualHost>
> 
> 	<VirtualHost 192.168.1.1>
> 	  ServerName www.site2.com
> 	  DocumentRoot /home/site2/html
> 	  ... etc.
> 	</VirtualHost>
> 
> (2) Alternatively, if you can have only one Domain Name, use Aliases to
> separate the document roots, e.g. (assuming your FQDN is www.mysite.com)
> 
> 	Listen 192.168.1.1
> 	ServerName www.mysite.com
> 	DocumentRoot /home/default/html
> 
> 	Alias /site1 /home/site1/html
> 	<Directory /home/site1/html>
> 	  Allow from all
> 	</Directory>
> 
> 	Alias /site2 /home/site2/html
> 	<Directory /home/site2/html>
> 	  Allow from all
> 	</Directory>
> 
> Now http://www.mysite.com/site1 will go to /home/site1/html etc. NB
> /home/default/html is necessary - this is where www.mysite.com ends up
> (you can just put a simple page there with links to the other sites).
> 
> Rgds,
> 
> Owen Boyle
> 
> "
> 
> hope this helps you puzzle out where it's not working for you.
> 
> Michael Olds wrote:
> 
>>Well my next suggestion is to bump the quesion tomorrow when there are
>>likely more experienced heads paying attention.
>>
>>Best Wishes!
>>Mike Olds www.buddhadust.org
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message