500 error

4 posts / 0 new
Last post
#1 Fri, 02/10/2017 - 21:55
quacky

500 error

One of our sites (a friend's website) has the following code in the .htaccess file:

<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript

ExpiresActive On
# Ends after 2 weeks
<filesMatch ".(gif|png|jpg|jpeg|txt)$">
Header set Cache-Control "max-age=1209600"
</filesMatch>

# ends after 1 day
<filesMatch ".(css|js)$">
Header set Cache-Control "max-age=604800"
</filesMatch>
</ifModule>

It works well in cpanel. Recently we have just migrate it to virtualmin, when i open the site, it says 500 error, it works if i removed this block of text in the .htaccess file. Could anyone help how to modify it to make it work in virtualmin server?

Thanks!

Fri, 02/10/2017 - 23:06
andreychek

Howdy,

A 500 error means Apache is seeing a problem of some sort... and it would generate a log message in $HOME/logs/error_log.

What message do you see logged in $HOME/logs/error_log?

-Eric

Sat, 02/11/2017 - 01:01
Diabolico
Diabolico's picture

Try to move </ifModule> from the bottom to right after "...javascript", then for the rest use <IfModule mod_headers.c> and group them with that.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Sun, 02/12/2017 - 11:25
quacky

Thanks andreychek and Diabolico. I didn't test the methods, but my friends was happy with the solution removing that entire block of text in the htaccess file. He says the site is working normally.

cheers!