[ale] secure/non-secure connections to Apache

Bradley Glonka bradley at linuxcentral.com
Tue Apr 9 08:40:27 EDT 2002



> I run an Apache Web server on my box as a learning/development
> environment. I can set the default port as 80 (non-secure) or 443
> (secure), but I can't seem to set up both. How do I enable both types of
> connections? Right now, my domain is just "localhost.localdomain". Do I
> need to resort to virtual hosting to set up a second domain?

You do need to configure a virtual server and run it on port 443.  You can 
point the document root to the same as your server on port 80 and give it 
all the same configuration directives.  This will give you a site that 
works as both http and https.

Here is a sample:

<VirtualHost	10.1.1.1:443>
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown 
downgrade-1.0 \
force-response-1.0
ServerName	site.com
ServerAlias	www.site.com
DocumentRoot	/www/site.com/html/
TransferLog	/logs/access_log
ErrorLog	/logs/error_log
ErrorDocument 404 /404.html
ScriptAlias	/cgi-bin/ /www.site.com/cgi-bin/
SSLEngine	on
XBitHack	on

SSLCertificateFile    /www/ssl.crt/site.com.crt 
SSLCertificateKeyFile /www/ssl.key/site.com.key 

</VirtualHost>                                  




---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list