Force Apache to Always Use HTTPS/SSL CentOS 6

Force Apache to Always Use HTTPS/SSL CentOS 6

Force Apache to Always Use HTTPS/SSL CentOS 6

In this blog we have already setup apache to run as SSL, now we want to force ALL traffic to use SSL, rather than port 80.

We are assuming you completed the steps from this page

http://blog.zwiegnet.com/linux-server/configure-apache-for-ssl-https-centos-6

Let’s get Started, edit the primary Apache configuration file

Apache HTTPS redirect: Let’s get Started, edit the primary Apache configuration file

Main Website only:

Apache HTTPS redirect: Main Website only

This is to set the global name, and redirect all

Apache HTTPS redirect: This is to set the global name, and redirect all

restart Apache, and Confirm Changes

Virtual Hosts:

Edit the Apache Config

Apache HTTPS redirect: Edit the Apache Config

find the virtualhost for example you want to force HTTPS

Apache HTTPS redirect: find the virtualhost for example you want to force HTTPS

and restart Apache, verify all works

Apache HTTPS redirect: and restart Apache, verify all works

That’s it!

Hosted Linux Servers at www.zwiegnet.com/go

Related guides: Install Apache on CentOS 6.4 | Disable Apache Version

Leave a Reply

Your email address will not be published. Required fields are marked *