How to disable HTTPS on CentOS Apache 2 installed on Amazon EC2?

0

I installed CentOS an Amazon EC2 instance, and I inserted an SSL certificate using Let's Encrypt - Free SSL / TLS Certificates >. It was all cute and working perfectly. See:

Every time you enter http:// , the user is automatically redirected to https:// . Since I'm running some tests, I would like to disable HTTPS.

I entered the file /etc/httpd/conf.d/ssl.conf and saw all configuration, but did not know what to do to disable HTTPS so that it only works again using HTTP.

How can I disable HTTPS on CentOS Apache 2 installed on Amazon EC2?

    
asked by anonymous 02.09.2017 / 05:59

1 answer

1

If you just want to disable redirection, just look at httpd.conf (or included configuration files) something like this:

Redirect permanent / https://dominio.com/
  

It's pretty likely you're in the vhosts

It may be that the redirect is in .htaccess , too, it might look something like this:

RewriteRule ^(.*)$ https://dominio/$1 [L,R=301]

Just add # up front to comment this line.

It is important to remember that when the browser receives a 301 redirect even though you remove the redirect the browser will still continue to point to the url with HTTPS, this is because redirect 301 is called permanent redirection and this the browser writes in your local data of your profile such redirection, that is the browser before you can even connect in the domain will redirect to HTTPS.

To avoid this redirect, there are only two ways, either by clearing the browsing data or by opening the browser anonymously.

    
02.09.2017 / 06:22