Jump to content

Front end not loading CSS


Recommended Posts

I recently installed for the first time PrestaShop latest version (1.6.1.1) in a subdirectory (/prestashop/) in my VPS. As soon as I uploaded all PrestaShop files I modified owner and permissions of files and directories:

 

chown -R www-data:www-data prestashop

 

find prestashop -type d -exec chmod 777 {} +

 

find prestashop -type f -exec chmod 644 {} +

 

but I noticed that the front end did not load CSSes files so it shows up not formatted.

 

I thought that this was due to some path problems so I checked URLs and paths but URI in Preferences -> URL and SEO is set as:

base_URI: /prestashop/

I start looking around and I read that the problem may be due to an active SSL on a non-SSL CDN, but SSL di disabled. But nothing up to now fixed the problem.

 

I did not change any .htaccess.

 

 

Thank you for any help.

 

Link to comment
Share on other sites

I looked at Apache's error.log file and it reported the following two errors:

/var/www/enrico.io/htdocs/prestashop/themes/.htaccess: Deny not allowed here, referer: http://www.enrico.io/prestashop/
/var/www/enrico.io/htdocs/prestashop/modules/.htaccess: Deny not allowed here, referer: http://www.enrico.io/prestashop/

The .htaccess files in "modules" and "themes" is the same:

<FilesMatch "\.tpl$">
    Deny from all
</FilesMatch>

I commented the "deny" line from both the files and the template loaded correctly. I then looked around about this issue and found it was reported here. I followed the suggestion by changing the .htaccess to:

<FilesMatch "\.tpl$">
    Require all denied
</FilesMatch>

but it didn't work, and the error was again (this time with "require"):

/var/www/enrico.io/htdocs/prestashop/modules/.htaccess: Require not allowed here, referer: http://www.enrico.io/prestashop/
/var/www/enrico.io/htdocs/prestashop/modules/.htaccess: Require not allowed here, referer: http://www.enrico.io/prestashop/

so I simply commented the "deny" line again.

Edited by nicero (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...