
Ich habe es ScriptAlias
wie folgt konfiguriert:
<VirtualHost *:443>
ScriptAlias /path/ "/path/to/bin/cgi"
</VirtualHost>
Ich möchte Apache verwenden, um eine grundlegende Authentifizierungswand davor zu setzen. Mein erster Instinkt ist, es zu versuchen
<VirtualHost *:443>
<Location "/path">
ScriptAlias / "/path/to/bin/cgi"
AuthType Basic
AuthName ...
... other auth stuff ...
</Location>
</VirtualHost>
Aber wenn ich das versuche, bekomme ich diesen Fehler
ScriptAlias cannot occur within directory context
Wie setze ich eine Basisauthentifizierung davor? Danke!
Antwort1
Aus irgendeinem Grund habe ich das hier nicht ausprobiert, obwohl es funktioniert hat:
<VirtualHost *:443>
ScriptAlias /path "/path/to/bin/cgi"
<Location "/path">
AuthType Basic
AuthName ...
... other auth stuff ...
</Location>
</VirtualHost>