Elisa
Elisa

Reputation: 7093

Magento https gives 404

I just install and configure SSL on my store. Normally I can get product detail like http://www.mydomain.com/product-name-here.html.

Since https is enabled, I should be able to get https://www.mydomain.com/product-name-here.html. But this is not happening.

But If place test.html inside root and try to access it by http://www.mydomain.com/test.html or https://www.mydomain.com/test.html. It works.

The problem is with only re-write urls. What can be the reason.

Thanks

Upvotes: 0

Views: 1120

Answers (2)

Mohit
Mohit

Reputation: 807

I had missing virtual host configuration in my apache configuration.

/etc/apache2/sites-available/default-ssl.conf

Content:

<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/magento
    ServerName <my-domain>.com
    <Directory "/path/to/root-of-web-app">
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    SSLProtocol -all +TLSv1 +SSLv3
    SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM

    SSLCertificateKeyFile /home/server/Mohit/ssl_certs/server.key

            SSLOptions +StdEnvVars
    </FilesMatch>
    <Directory /usr/lib/cgi-bin>
            SSLOptions +StdEnvVars
    </Directory>
    BrowserMatch "MSIE [2-6]" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
    # MSIE 7 and newer should be able to use keepalive
    BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

</VirtualHost>

Upvotes: 0

Elisa
Elisa

Reputation: 7093

It was other issues, I just took out following from Apache vhost config

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory /path/to/web-root/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

It worked

Upvotes: 1

Related Questions