SEO URLs not working for Opencart - ubantu18.04

Posted April 5, 2020 1.3k views

I had a default Vhost conf file. Installed SSL with certbot. Couple of more Conf files I see now that got created besides the .conf file I had enabled earlier. These new conf files mention Virtual host port 443.

Am getting below error:
Not Found

The requested URL was not found on this server.

Apache/2.4.29 (Ubuntu) Server at Port 443

I tried the following:

Changed Allow Override to All in apache2.conf and then sudo systemctl restart apache2, but I started getting internal server error on the main page itself.

Doesn’t seem to be working. plz advise

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there @satyadeo,

It sounds like that mod_rewrite might not be enabled. You can check this with the following command:

  • sudo apachectl -M | grep -i rewrite

If you don’t see any output, you can enable the module by running the following commands:

  • sudo a2enmod rewrite

Then run a config test to make sure that there are no problems with your Apache config:

  • sudo apachectl -t

If you get a Syntax OK message go ahead and restart Apache:

  • sudo systemctl restart apache2

Hope that this helps!

  • Hi Bobby,

    I ran the above commands. was getting the below warning after first step:

    Could not reliably determine the server’s fully qualified domain name, using for ServerName

    So, I added “ServerName localhost” at the end in apache conf file.

    Now it returns: rewrite_module (shared)
    I got Syntax OK as well after that.

    I also changed AllowOverride All in the apache conf file.

    <Directory /var/www>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

    Restarted Apache.

    SEO URL works now !!!

    Thank you so much.