manning allan wrote:
Forgive me for being stupid, but I cannot find in the documentation,
nor can I find the list archives.
I know I am rather new to this, and I do not want to be spoon fed, but
a little direction would be helpful.
I have successfully added virtual hosts to my Windows box, and have
them functioning. I just need one of the hosts to require SSL (HTTPS).
I have found the documentation on how to set up virtual hosts
(obviously as it is working) and on how to set up SSL on the whole box.
If this seems to trivial to try to help me, please at least direct me
to a forum or other such site where I can learn more.
Use something like this for your VirtualHost to make it use SSL (replace
IP and domain accordingly).
<VirtualHost 1.2.3.4:443>
# Apache Configuration >-------------------------------------------
ServerName www.example.com
DocumentRoot /var/www/www.example.com/htdocs
SSLEngine on
SSLCertificateFile /etc/ssl/certs/www.example.com.crt
SSLCertificateKeyFile /etc/ssl/private/www.example.com.key
</VirtualHost>
If you want to force requests for http://www.example.com to go to
https://www.example.com, then you can use a rewrite rule or redirect in
the VirtualHost container for the NON-https host.
<VirtualHost 1.2.3.4:80>
...
RewriteEngine On
RewriteRule ^/(.*)$ https://www.example.com/$1 [R=permanent]
</VirtualHost>
--
Justin Pasher
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]