0

I moved 2 sites from a shared server to a VPS. One works just fine with a custom theme, but the second doesn't have the Bartik CSS loaded.

Both sites moved via the user root and as it seems almost all of their dirs are 755 root root. Temporary files dir is /tmp manual cache flush from from DB doesn't change anything.

Something wierd I noticed and don't know to solve is the fact I can't disable CSS or JS aggregation. Maybe this reflects the core problem?


enter image description here


4

This sometime happens if Apache server is not able to write files or directory.

Since you mentioned you moved using root user, Apache server may not be running on root user.

To further clarify this: If the inodes of both sites have the same permissions, ownership, grouping, but only one works, it's because it doesn't have CSS and JS aggregation on (a thing that requires an Apache user --- that is, www-data ownership and grouping, that you should apply).

You could either turn off CSS and JS aggregation for the non working site (and then it'll work), or make sure you give both sites such ownership and grouping if you want both of them to work properly with CSS JS aggeregation.

If at least for now you just want to turn off CSS JS aggregation, read here how to do so, but for troubleshooting this (and take care of the root cause), read the following (you might want to precede it with this piece of data on the aforementioned Apache user):

  1. First check on which user apache server is running. Finding out what user Apache is running as?

  2. Change your tmp folder and files folder ownership to that user so that it is writable by Apache.Giving ownership of the directory to the apache user?

  3. Make sure you have tmp directory created in your files folder and is writable by Apache server. You can define it your Configuration > File System

  • Is the native Apache user www-data?... Also, how is it that one of the sites does work properly when it's group is not www-data? – JohnDoea Nov 24 '16 at 4:34
  • Well you need to check on what users Apache server is running, www-data is usually default user, though it may change. You need to check if aggregation is enabled in your second website, since no aggregation is enabled on your second website it will not need to create the files in tmp directory. It will just loads the files directly. – sarathkm Nov 24 '16 at 6:25

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.