httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun G Nair <arungn...@gmail.com>
Subject [users@httpd] Both IP based and name based virtual host on same server.
Date Tue, 13 Sep 2005 10:56:12 GMT
Hi list,
We have Apache 1.3 running on debian (172.16.2.0 <http://172.16.2.0>). We 
have several name based virtual hosts that we use for development. Now we 
need a virtualhost with SSL support. After going through the docs I found 
that SSL with Name based virtual host is not possible. So I'll need an IP 
based virtualhost config. I created a virtual alias
(172.16.2.10<http://172.16.2.10>)
for this. Now how do i setup both name based and IP based (with SSL) virtual 
hosts ?

I have added the below parts for mod_ssl . 

-----------------httpd.conf--------------------

LoadModule ssl_module /usr/lib/apache/1.3/mod_ssl.so

<IfModule mod_ssl.c>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfModule>

<IfModule mod_ssl.c>
SSLCACertificateFile /etc/apache/ssl.crt/ca-bundle.crt
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/var/run/ssl_scache
SSLSessionCacheTimeout 300
SSLMutex file:/var/run/ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

-----------------httpd.conf--------------------

Below is the virtual host that I need :

-----------------httpd.conf--------------------

NameVirtualHost *

<VirtualHost *>
ServerName abc.com <http://abc.com>
DocumentRoot /var/www/abc
</VirtualHost>

# Below is the virtual host that I need :

<VirtualHost 172.16.2.10:443 <http://172.16.2.10:443>>
ServerName secure.abc.com <http://secure.abc.com>
DocumentRoot /var/www/abc
</VirtualHost>
-----------------httpd.conf--------------------

Now what all things do I need for this. Will I need :

- Listen 443
OR
- Listen 172.16.2.0:80 <http://172.16.2.0:80> 
- Listen 172.16.2.10:443 <http://172.16.2.10:443>
(172.16.2.0 <http://172.16.2.0> is the address for name based virtual hosts. 
They use Port 80)
(Now, Listen is commented out and 'Port 80' is enabled. )

- NameVirtualHost 172.16.2.0:80 <http://172.16.2.0:80>
(Now its NameVirtualHost * )


Regards,
 Arun

Mime
View raw message