[Techtalk] apache question

Cynthia Kiser cnk at ugcs.caltech.edu
Sat Dec 5 01:39:36 UTC 2009


Given what you want and the files you are starting with (by the way,
what is your distro? I have never heard of ports.conf), it sounds like
you are heading in the right direction. One thing to look out for/test
is what happens when you make an https request for the domain that you
DON"T want to use SSL. You may end up with it not responding (and
certainly will if you do Listen x.x.x.x:443) or you may end up making
an https request to the other domain. Just make sure you check the
one(s) you don't want configured to make sure they are not.


Quoting Maria McKinley <maria at shadlen.org>:
> Hello there,
>
> I am trying to figure out how the stuff here:
>
> http://httpd.apache.org/docs/2.0/vhosts/examples.html
>
> actually fits into config files. I keep getting confused as to what is  
> suppose to go in apache2.conf, what goes into files in sites-available,  
> and what goes into ports.conf.
>
> For example, am I correct in assuming that for the first example, the  
> first bit goes into ports.conf:
>
> # Ensure that Apache listens on port 80
> Listen 80
>
> this goes into apache2.conf:
> # Listen for virtual host requests on all IP addresses
> NameVirtualHost *:80
>
> and each of these VirtualHost directives go into their own file in  
> sites-available?
>
> <VirtualHost *:80>
> DocumentRoot /www/example1
> ServerName www.example1.com
>
> # Other directives here
>
> </VirtualHost>
>
> <VirtualHost *:80>
> DocumentRoot /www/example2
> ServerName www.example2.org
>
> # Other directives here
>
> </VirtualHost>
>
> What I want to do is have a configuration that has two ips (internal and  
> external), two domains on both of those ips, plus a secure site for 443  
> ports on both ips (but just one of the domains). I think I understand  
> how to do it from the examples given, but wasn't quite sure where to put  
> said configurations.
>
> thanks,
> maria


More information about the Techtalk mailing list