SSL and Virtual hosts?

Glyn Astill <[email protected]>
Newsgroups gmane.comp.apache.mod-ssl.user
Message-ID <[email protected]>
Hi people,

So I got ssl started, and now I'm trying to sort out my virtual hosts
but I can't seem to get them to work.

What I want to do is get https://mail.mydomain.net to take me to my
mail directory and https://www.mydomain.net to take me to my htdocs,
just like I can on http.

For example I'm putting the VirtualHosts below between the IfDefine
SSL tags in ssl.conf. Any pointers would be ace. Thanks.


NameVirtualHost *:443

<VirtualHost *:443>
     ServerName mail.mydomain.net
     DocumentRoot /usr/pkg/share/mymail

     SSLEngine on
     SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
     SSLCertificateFile /usr/pkg/etc/httpd/ssl.crt/server.crt
     SSLCertificateKeyFile /usr/pkg/etc/httpd/ssl.key/server.pem
     <FilesMatch "\.(cgi|shtml|phtml|php3|PHP?)$">
         SSLOptions +StdEnvVars
     </FilesMatch>
     <Directory "/usr/pkg/libexec/cgi-bin">
         SSLOptions +StdEnvVars
     </Directory>

     SetEnvIf User-Agent ".*MSIE.*" \
              nokeepalive ssl-unclean-shutdown \
              downgrade-1.0 force-response-1.0
     CustomLog /var/log/httpd/ssl_request_log \
               "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
<VirtualHost *:443>
     ServerName mydomain.net
     ServerAlias *.mydomain.net
     DocumentRoot /usr/pkg/share/httpd/htdocs/

     SSLEngine on
     SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
     SSLCertificateFile /usr/pkg/etc/httpd/ssl.crt/server.crt
     SSLCertificateKeyFile /usr/pkg/etc/httpd/ssl.key/server.pem
     <FilesMatch "\.(cgi|shtml|phtml|php3|PHP?)$">
         SSLOptions +StdEnvVars
     </FilesMatch>
     <Directory "/usr/pkg/libexec/cgi-bin">
         SSLOptions +StdEnvVars
     </Directory>

     SetEnvIf User-Agent ".*MSIE.*" \
              nokeepalive ssl-unclean-shutdown \
              downgrade-1.0 force-response-1.0
     CustomLog /var/log/httpd/ssl_request_log \
               "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>



      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email protected]
Automated List Manager                            [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.