0

I recently installed an SSL certificate on my server and now HTTPS seems to work for all the pages.

However, the server is still accepting connections from HTTP. How do I enforce HTTPS?

I use a CentOS Linux distribution on my server.

1

Assuming you are using apache you can edit /etc/httpd/conf/httpd.conf and comment out the line Listen 80

Another solution is to continue to have port 80 open and in your application detect non SSL use and redirect to the SSL version.

Here is an Apache wiki document with a possible redirect solution as well. https://wiki.apache.org/httpd/RedirectSSL

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.