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.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
Assuming you are using apache you can edit /etc/httpd/conf/httpd.conf and comment out the line
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