user3264461 user3264461 - 1 year ago 86
Apache Configuration Question

Apache2 SSL Configuration with Virtual Hosts on Ubuntu 14.x

I would like to have ONLY https traffic. I want all of it to be driven to and

At present this is what works and doesn't work: - ok! - shows a list of files in my webroot for some reason - This site can’t be reached / refused to connect. - The page isn’t working. didn’t send any data.

I am using Ubuntu 14 (trusty) and here is my current enabled virtual host config:

<IfModule mod_ssl.c>

DocumentRoot /var/www/

SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars

<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

Any help much appreciated as going nuts!

Answer Source

Did you tried made permanent redirect?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download