0

My server has just been updated and now on my site the file paths for css, js and everything is wrong: the path weirdly includes the document root, so the path looks like:

https://www.example.co.uk/var/www/html/www.example.co.uk/skin/frontend/mytheme/default/css/styles.css

First thing I checked was the core table and can confirm the core table looks correct:

the core table

The secure url and unsecure url are correctly set as:

I am lost as to why this is happening. I am thinking it could be a Selinux issue:

ls -Z: Shows, for example unconfined_u:object_r:httpd_sys_content_t:s0 var system_u:object_r:httpd_sys_content_t:s0 favicon.ico

UPDATE: This is a SElinux issue with permissions. I have managed to overcome this for now by setting the SElinux to permissive mode.

I guess I could run:

chcon -R -t httpd_sys_rw_content_t /var/www/html/magentofoldername/*

But, not this is the best thing. I was wondering if someone had a more educated idea of how to best approach this? like how would I correctly set the labels.

0

I've had this happen before if my base_url doesn't have a / at the end.

I've also seen it be an issue if there's an error with the cached data on merged JS/CSS. Try turning on/off merged JS/CSS, see if that helps...

  • it's an Selinux issue, as setting it in permissive mode has solved it. Need to figure out correct SElinux now for Magento – Vaishal Patel Sep 10 at 8:29

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.