1

We recently deployed our new website and when trying to use it over SSL with cloudflare, it redirects to the Apache root dir?

I generated origin TLS certificates and downloaded those from cloudflare for the domain and then configured the virtual host to use SSL:

<VirtualHost *:443>


       ServerAdmin webmaster@domain.com
        ServerName domain.com
        ServerAlias www.domain.com
        DocumentRoot /home/domain/public_html
        SSLEngine on
        SSLCertificateFile /etc/apache2/cert/domain.com.pem
        SSLCertificateKeyFile /etc/apache2/cert/domain.com.key
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

I've tried cloudflares flexible, full and strict SSL setting.

But for some reason, it still goes to the default dir of apache?

I just cannot grasp why.

  • Do you have any page rules set at Cloudflare? – DocRoot Jan 21 at 22:17
  • @DocRoot Nope, just regular A record DNS to domain name to the webserver and using cloudflares CDN / Http proxy. – Emil Jan 22 at 7:47
  • 1
    Is Cloudflare handling the SSL? If so, it may be proxying your site via HTTP. Check to make sure that port 80 requests are also going to that directory. – Stephen Ostermiller Jan 22 at 18:45
  • Yeah it's a HTTP proxy, and I've tried forcing HTTPS via cloudflare, no dice. – Emil Jan 25 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.