3

I am using Apache with passenger for rails app, when i type http://localhost , it automatically rediects to https://localhost. How can i stop it

Thanks

4
  • 1
    By finding out what causes that redirect. You have to check 1. the configuration of your host for redirection rules and 2. any potantial .htaccess style files inside your documents folder. This task probably will be easier for you if you read a few things about how redirecting is done in an http server. Then you have a more clear idea of what you are looking for. Commented May 25, 2015 at 11:23
  • where to check 1)the configuration of my host for redirection rules, in /sites-available/000-default.conf , i did not write any code Commented May 25, 2015 at 11:24
  • If that is a "normal" installation of a package, then the configuration should be somewhere under /etc/apache2 or /etc/httpd or similar. You are looking for something like RewriteRule... Commented May 25, 2015 at 11:25
  • Sorry dude, it was due to browser cache, which redirect me to https, Thanks dude for helping :) Commented May 25, 2015 at 11:44

1 Answer 1

4

For disabling SSL without a command you can manually edit the SSLEngine directive in your ssl configuration file (usually in /etc/apache2/sites-enabled/default-ssl.conf) change:

SSLEngine on 

to:

SSLEngine off 

restart Apache

sudo service apache2 restart 

from: https://httpd.apache.org/docs/2.4/mod/mod_ssl.html

Sign up to request clarification or add additional context in comments.

1 Comment

mine worked by adding SSLEngine off directive in the httpd.conf file

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.