0

I would like to use .htaccess files to password protect certain directories of my website, which is running on a Google Compute Engine Debian instance with LAMP installed.

However, GCE appears to ignore .htaccess files.

How do you enable HTTP basic auth so .htaccess files will work on GCE instances?

1 Answers1

1

GCE Instances are linux servers. No more, no less. Just like any other linux server, they need to be configured properly. It's likely that all you need to do is tweak your apache configuration accordingly to get it to respect your .htaccess file.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • I was looking for the http.conf file to enable .htaccess but couldn't find it. I thought perhaps GCE did not allow access to this file. However, reading the Apache documentation, I realized http.conf has been replaced by apache2.conf. I editted apache2.conf and enabled http basic authentication and my htaccess files work as they should. – charred water Jun 01 '17 at 05:56