AnsweredAssumed Answered

Why Apache web server redirect from http to https error

Question asked by Camille Lola on Nov 27, 2018
Latest reply on Dec 4, 2018 by Camille Lola

Hi Guys,

Recently I am facing a crazy problem, I have a multi-host setup for my Apache web server with let's encrypt SSL running. I am basically hosting 2 applications which are OpenProject and SugarCRM which I don't believe should matter. Here's my environment.

Centos 7-4.1708 64 Bit Webserver: Apache Web Server 2.4 All running as VM in ESXI OpenProject IP: SugarCRM IP: Gateway:

So every time I logged in to the OpenProject with https, it accepted the username and password but then it gave me this error.

Bad Request. Your browser sent a request that this server could not understand.   Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please.

My config setting is as follow.

<VirtualHost *:4000> ServerName ServerAlias ServerAdmin DocumentRoot /opt/openproject/public ErrorLog /var/log/httpd/ CustomLog /var/log/httpd/ common  <Directory /opt/openproject/public>       Options +FollowSymLinks +Includes       AllowOverride All       Require all granted    </Directory>  ProxyRequests off ProxyPass / retry=0 ProxyPassReverse /  SSLEngine On SSLCertificateFile /etc/letsencrypt/live/ SSLCertificateKeyFile /etc/letsencrypt/live/ </VirtualHost>  <VirtualHost *:4001>    ServerAdmin    ServerName    ServerAlias    DocumentRoot /opt/sugarcrm    ErrorLog /var/log/httpd/    CustomLog /var/log/httpd/ common   <Directory /opt/sugarcrm>       Options +FollowSymLinks +Includes       AllowOverride All       Require all granted    </Directory>  SSLEngine On SSLCertificateFile /etc/letsencrypt/live/ SSLCertificateKeyFile /etc/letsencrypt/live/ </VirtualHost>

I am sure I am missing something in this configuration and for the life of me after Dinkin around for a couple of days, I still couldn't figure out what I did wrong. I believe it has something to do with wrong redirect configuration. I am so frustrated right now that it's getting to the point of writer's block. Can anyone of you, Apache web server master share with me some inside on how to fix my config file for Apache? Many thanks in advance for all of your help.

Thanks & Regards