1

I am migrating our Magento site from a shared hosting company to a new virtual server. Database is the same, files are the same and the URLs are not changing.

The site works fine with HTTP. However with HTTPS the certificate loads correctly, however, all the resources are presented on the page with an http:// URL, causing issues with browser security checks.

Upon attempting to access the admin interface, the page never loads and Chrome presents me with a redirect loop error.

Narrowing it down, I can see the only issue here being the configuration of the web server, since nothing else has changed. There is bound to be an option I've missed somewhere in the SSL config.

Web server is Apache 2.4.6 running on CentOS. I'm running the latest version of Magento 1.9.

Any help would be appreciated!

0

Worked out what was causing the issue was in the end.

I was using a VirtualHost to server the Magento content, however my lack of knowledge in Apache led me to believe that the VirtualHost would inherit stuff in the default file at /etc/httpd/conf.d/ssl.conf, however this didn't seem to be the case.

After declaring some of the options in my VirtualHost file /etc/httpd/sites-enabled/my-magento-store-ssl.conf, this started to work.

So I restored the default file back to it's default state, and created the VirtualHost file with the options.

Example of this file is as follows:

    <IfModule mod_ssl.c>
    <VirtualHost *:80>
    ServerName store.example.com
    ServerAlias alt-url.example.com
    DocumentRoot /var/www/html/magento
    ErrorLog /var/log/httpd/store_error_log
    TransferLog /var/log/httpd/store_access_log
    <Directory "/var/www/html/magento">
        Options +FollowSymLinks +Indexes +MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    </VirtualHost>

    <VirtualHost *:443>
        ServerName store.example.com
        ServerAlias alt-url.example.com
        DocumentRoot /var/www/html/magento
        ErrorLog /var/log/httpd/store_error_log
        TransferLog /var/log/httpd/store_access_log
        LogLevel warn
        SSLEngine on
        SSLProtocol all -SSLv2
        SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA
        SSLCertificateFile /etc/httpd/conf/cert.crt
        SSLCertificateKeyFile /etc/httpd/conf/private.key
        SSLCACertificateFile /etc/httpd/conf/ca.crt 
    <Directory "/var/www/html/magento">
        SSLOptions +StdEnvVars
    </Directory>
    <Files ~ "\.(cgi|shtml|phtml|php3?)$">
        SSLOptions +StdEnvVars +FakeBasicAuth +ExportCertData +StrictRequire

    </Files>


    BrowserMatch "MSIE [2-5]" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0

    CustomLog logs/ssl_request_log \
              "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    </VirtualHost>
    </IfModule>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.