httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arun G Nair <arungn...@gmail.com>
Subject Re: [users@httpd] Both IP based and name based virtual host on same server.
Date Wed, 14 Sep 2005 05:58:05 GMT
Hi all,
Atlast I got it working !!!! So name based virtual hosting *is* possible 
with mod_ssl. 

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

< IfModule mod_ssl.c >
     Listen 443
     Listen 80
     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 >

NameVirtualHost 172.16.2.0:80 <http://172.16.2.0:80>

<VirtualHost 172.16.2.0:80 <http://172.16.2.0:80>>
        ServerName abcn.com <http://abcn.com>
        DocumentRoot /var/www/abc
</VirtualHost>

# SSL Virtual Hosts

NameVirtualHost 172.16.2.0:443 <http://172.16.2.0:443>

< VirtualHost 172.16.2.0:443 <http://172.16.2.0:443> >
    DocumentRoot /var/www/abc
    ServerName secure.abcn.com <http://secure.abcn.com>
    SSLEngine on
    SSLCertificateFile    /etc/apache/ssl.crt/server.crt
    SSLCertificateKeyFile /etc/apache/ssl.key/server.pem
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    CustomLog /var/log/ssl_request_log \
        "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
< / VirtualHost >

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

Let me know if this can be trimmed down some more. Thanx everyone, 
especially Davide. 

Regards, 
Arun

Mime
View raw message