Turning off PageSpeed and OPcache in Bitnami Apache for Google Cloud Platform

Here’s how to turn off the Google PageSpeed module within Apache and PHP’s OPCache functionality that is enabled by default within Bitnami instances on Google Cloud Platform.

    1. Establish a terminal session to your Google Cloud Platform instance with your preferred terminal client (e.g. Putty).
    2. Open up /opt/bitnami/apache2/conf/httpd.conf with your preferred file editor and find the following lines:Include conf/pagespeed_libraries.conf
      Include conf/pagespeed.conf
    3. Comment them out to match the following lines:
      # Include conf/pagespeed.conf
      # Include conf/pagespeed_libraries.conf
    4. Save changes and return to terminal prompt.
    5. Open up /opt/bitnami/php/etc/php.ini with your preferred file editor and find the following line:opcache.enable=1
    6. Comment it out and disable opcache.enable by matching the following lines:
      # opcache.enable=1
      opcache.enable=0
    7. Save changes and return to terminal prompt.
    8. Restart the Apache service with the following command:
      sudo /opt/bitnami/ctlscript.sh restart apache

That’s it 🙂

Finally a Fix for XAMPP and WordPress Permalinks

Error 500 – Server error!

Fun times with Apache… Recent releases of XAMPP for Windows hide additional Apache overrides outside of the reach of …/apache/conf/httpd.conf. If you’re like me and exhausted all prior Google results to get Permalinks working with XAMPP give this one a go.

  1. Open …/apache/conf/extra/httpd-xampp.conf
  2. Replace all instances of AllowOverride None and AllowOverride AuthConfig with AllowOverride All
  3. Save changes
  4. Open XAMPP Control Panel and restart the Apache service or open the Windows Services dialog and restart the Apache2.4 Service
  5. Breathe and give that Error 500 tab a refresh

Woop! In case this doesn’t work it’s likely you’ve missed one of the basics:

  1. Open …/apache/httpd.conf
  2. Uncomment #LoadModule rewrite_module modules/mod_rewrite.so
  3. Replace all instances of AllowOverride None and AllowOverride AuthConfig with AllowOverride All
  4. Save changes
  5. As above, restart the Apache Service.