Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prestashop backoffice works but the frontoffice doesn't. The url is not found

I have developed a multilanguage prestashop store completely in localhost using xampp in mac and it works. Both the backoffice and the store (frontoffice). After that, i have deployed it to amazon but there comes my problem. The backoffice works but the store doesn't.

The browser just displays an apache 404 page and tells me The requested URL domain/prestashop/en/ was not found on this server. But it does exist. Besides, the backoffice confirms it.

Inspecting the error.log I find the following message:

[Thu Mar 12 11:12:37 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/prestashop/en

For what I see, Apache is treating the language (/en/) as file when it is not. I've searched all across the web and I can't find how to fix it. I know it is a server issue, but somehow can't find the solution.

What's the matter here?

-- EDIT --

I fixed the issue doing the following steps:

  1. Deleted the root .htaccess.
  2. Cleared the smarty cache files under ./cache/smarty/compile
  3. Load the mod_rewrite module that was not installed: a2enmod rewrite
  4. Added the Allowoverride All directive to /etc/apache2/apache2.conf
<Directory /var/www/prestashop/>
        Options Indexes FollowSymLinks
        AllowOverride All
</Directory>
  1. Restarted apache2: service apache2 restart
like image 649
Leonardo Lanchas Avatar asked Mar 12 '15 11:03

Leonardo Lanchas


1 Answers

I usually set my vhost in the following way

<Directory /var/www/prestashop/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
like image 177
grptx Avatar answered Oct 20 '22 05:10

grptx