Solve WP Super Cache + Autoptimize Internal Server Errors

Yesterday I noticed my autoptimized JS-files were returning an internal server error (CSS worked as that is inlined). My Apache error-log had this entry:

[Tue Oct 13 17:23:42 2015] [alert] [client 178.xx.xx.xx] /var/public_html/blog.futtta.be/wp-content/cache/.htaccess: Option Indexes not allowed here

/var/public_html/blog.futtta.be/wp-content/cache/.htaccess is created by WP Super Cache, which got updated recently, a.o. to disable indexes being created of directories, and the .htaccess indeed read;

# BEGIN INDEX
Options -Indexes
# END INDEX

The solution? I could have edited WPSC’s .htaccess, but my changes could get overwritten there whenever Donncha would feel like it, so in the end I edited my site’s config in Apache;

<directory /var/public_html/blog.futtta.be>
AllowOverride All
</directory>

And all is well now.

6 thoughts on “Solve WP Super Cache + Autoptimize Internal Server Errors”

  1. Ya… something did look fishy to me yesterday… when I accessed your blog from my smartphone… the menu button was not responding.. thumbnails of videos from wp youtube lyte were not generated. I mailed you about the issue. Also… I believe you are on a VPS…. if so then why not to use apache host definition block to define everything and disable htaccess completely…

    Reply
  2. I also have WPSC. I did get issues with a menu today. Could that be related to your plugin? Should I do the same edit you did? If so, where in the file do I paste the code?
    Thanks
    Mikael

    Reply
    • well, the problem described in above article really is due to a change in WPSC and issues with your menu might or might not be related. can’t tell now, as you have AO de-activated. if this does turn out to be the problem, then you need to change your Apache configuration, which in my case is in /etc/apache2/sites.available/blog.futtta.be. if you reactivate AO, I’ll be happy to have a look at what is going on.
      frank

      Reply
  3. The addition is not to .htaccess, but to a major Apache config file, which I don’t want AO to write to, of which the location is unknown to AO and which requires an Apache reload (or restart). So no, I’m afraid AO 2.0 will not solve this.

    Reply

Leave a Reply to Rudra Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.