You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "John P. Speno" <jp...@gmail.com> on 2005/11/06 00:07:29 UTC

[users@httpd] Limiting SSL to a specific virtual host

On a 1.3.27 server with 1 IP address and 3 name based virtual hosts.  
As it is now, if you use 'https' with any of the domain names that  
resolves to this server's address, you'll see the same document root.  
How do I limit the SSL part to work for just "www.example2.com" and  
not for any of the other domains? Also, suggestions on what to return  
in those other cases are also welcome (404? Something else?).

Here's my minimal config:

ServerName www.example1.com
DocumentRoot /example1
<VirtualHost *>
</VirtualHost>

<VirtualHost *>
     ServerName www.example2.com
     DocumentRoot /example2
</VirtualHost>

<VirtualHost *>
     ServerName www.example3.com
     DocumentRoot /example3
</VirtualHost>

<VirtualHost _default_:443>
     # I only want this port to "work" for https://www.example2.com/*
     DocumentRoot /example2
</VirtualHost>

Thanks.

---------------------------------------------------------------------
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