Frage

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?

War es hilfreich?

Lösung

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>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top