0

I am trying to set development variable for xampp under Windows in order to do this:

<IfDefine !development>
  AuthType Basic
  AuthName "Say the secret word"
  AuthUserFile /var/www/hostname/.htpasswd
  Require valid-user
</IfDefine>

on Linux you do it like this

export APACHE_ARGUMENTS=-Ddevelopment

How do I do this on Windows? I've tried to do

set APACHE_ARGUMENTS=-Ddevelopment

but it didn't work.

Any ideas?

Edit: tried to add startup parameters to apache service config, but didn't help either.

Kokesh
  • 3,165
  • 7
  • 29
  • 46

1 Answers1

1

This may be a duplicate of Apache .htaccess - applying basic authentication conditionally based on environment or hostname

I have solved this issue by using the 'Allow from ....' directive.

This way I can blanket enable based off an IP ADDRESS

Here is the contents of my .htaccess file

Order deny,allow
Deny from all
AuthType Basic
AuthName "Secure Area"
AuthUserFile "/path/to/file/.htpasswd"
Require valid-user
Allow from 127.0.0.1
Satisfy Any
Community
  • 1
  • 1
Adan Rehtla
  • 1,548
  • 2
  • 13
  • 26