+4 votes
in CMS Tips by (71.8k points)

I was using VestaCP on my VPS and "Gallery 3" CMS was working fine. The combined CSS and javascript files were accessible. The combined CSS and JS files are delivered from folders that do not exist in the filesystem. mod_rewrite is used to access the non-existing folders.

As VestaCP does not support PHP-FPM, I installed MyVestaCP on my VPS and migrated "Gallery 3" to the new setup. Now the CMS is missing the combined CSS and Javascript files and when I try to open those files in the browser, it gives "404 - file not found" error. The website is completely distorted in the absence of CSS and Javascript files.  

The following error is present in the var/log folder of "Gallery 3".

The page you requested, combined/javascript/64a8abf40708d2c449343d2bfc90bf17.js, could not be found. in file system/core/Kohana.php on line 841

The page you requested, combined/css/0ee9b1fa8d5eb68dbb7eafffe58f9604.css, could not be found. in file system/core/Kohana.php on line 841

How can I fix this error? I think it's related to MyVestaCP. 

1 Answer

+1 vote
by (348k points)
selected by
 
Best answer

The error is indeed due to MyVestaCP, but the solution is very simple. MyVestaCP has several "Proxy template". You need to select the "hosting-legacy" template for your website and it will solve the problem.

Log into your MyVestaCP control panel and select the domain name that you are using for "Gallery 3" CMS and just do this:

Web -> Edit (domain) -> Proxy template -> hosting-legacy

The hosting-legacy template will pass requests for non-existent static files to Apache (where .htaccess will resolve it with mod-rewrite). The hosting or default template will not pass requests for non-existent static files to Apache.


...