Question

I need this page to be accessible to the public but this page to ask for a login. I would like to achieve this using Directory directives. In httpd.conf I have:

<Directory /var/www/hprcc-exp.unl.edu/staff/>
  <Files articlemanagement.php>
    AuthType Basic
    AuthName "HPRCC Staff Utilities"
    AuthUserFile /var/etc/hprccpass
    Require valid-user
  </Files>
  Order allow,deny
  Deny from all
  satisfy all
</Directory>

How do I achieve this goal?

Was it helpful?

Solution

Try to remove the Files directive and Deny from all (this will block everything unless you also define Allow from ...):

<Directory /var/www/hprcc-exp.unl.edu/staff/>
  AuthType Basic
  AuthName "HPRCC Staff Utilities"
  AuthUserFile /var/etc/hprccpass
  Require valid-user
</Directory>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top