Apache Config - Exclude Location from Authentication

后端 未结 2 1139
孤城傲影
孤城傲影 2021-01-17 16:19

I have a web application that is being protected by a Shibboleth authentication module. My current config is as below


 AuthType shibb         


        
2条回答
  •  时光取名叫无心
    2021-01-17 17:25

    When using Apache 2.4 instead of 2.2, in order to exclude "/server-status", the following was enough:

    
        AuthType Basic
        AuthUserFile /etc/apache2/.htpasswd
        
            Require ssl
            Require user valid_user_name
        
    
    

    Analyzing:

    • is equivalent to .
    • The regex used, is pcre (perl compatible regular expressions).
    • ^(?!/server-status) means:
      • ^: "starts with"
      • (?!): "negative look ahead (instead of positive (?=))"

提交回复
热议问题