Report this

What is the reason for this report?

When I add mod_expires rules in .htaccess file, I am getting 500 server error

Posted on April 17, 2014

I have installed WordPress from one click installation. I have enabled mod_expires and mod_headers. Now when I am trying to add mod_expires rule in .htaccess file, I am getting 500 server error.

error.log file says: /var/www/.htaccess: ExpiresActive not allowed here

What should I do now ?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Take a look at <a href=“http://serverfault.com/a/98159”>http://serverfault.com/a/98159</a>. <br> <br>You need to edit your virtualhost config and set <code>AllowOverride</code> to <code>All</code>.

I think u delete .htpasswd file <br> <br>

I am having the same problems when trying to add mod_expires to my .htaccess file.

I used the one click install so I don’t appear to have a Virtual Host set up for my domain. It just sits in /var/www and there is no virtual host config file. Am I safe to follow these instructions to set one up or do I need to do something differently? https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.