Try something like:
<VirtualHost 12.34.56.78:443>
  ServerName myvirtual.domain
  SSLEngine on
</VirtualHost>

<VirtualHost _default_:*>
  Redirect / https://myvirtual.domain/
</VirtualHost>



Quoting SoilentG <[EMAIL PROTECTED]>:

> I have an IP based virtual server that is defined like this:
> 
> in Vhosts.conf:
> 
> <VirtualHost 12.34.56.78:80>
> ServerName myvirtual.domain
> ...
> ...
> ...
> <Directory /home/user/public_html/cgi-bin>
> AllowOverride None
> Options +ExecCGI -Indexes
> </Directory>
> </VirtualHost>
> 
> and in ssl.default-vhost.conf
> 
> <VirtualHost 12.34.56.78:443>
> ServerName myvirtual.domain
> ...
> ...
> ..
> SSLEngine on
> SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
> SSLCertificateFile conf/ssl/virt/server.crt
> SSLCertificateKeyFile conf/ssl/virt/server.key
> SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
> CustomLog logs/ssl_request_log \
>           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
> RewriteEngine On
> RewriteOptions inherit
> </VirtualHost>
> 
> and it works fine, port 80, standard... port 443 SSL.
> 
> But I've decided that I want to force it to be SSL only.
> 
> So I have some questions:
> 
> 1) Am I silly to have dual vhost def's one in Vhost.conf
> and the other in mod-ssl.conf?
> 2) What's the best way to force it to be SSL only...
> a)close port 80?
> b)remove def from Vhost.conf?
> c)all of the above?
> d)other way that I can't think of?
> 
> Thanks,
> 
> Jeff
> 
> ______________________________________________________________________
> Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
> User Support Mailing List                      [EMAIL PROTECTED]
> Automated List Manager                            [EMAIL PROTECTED]
> 


______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to