开发者

Is it possible to set Apache Basic Authentication to lock a directory, except for one file?

I'm working on an upcoming project, but the team needs to access it online. I've setup (for now) Basic Authentication using:

    <Directory /var/www/html>
            AuthType Basic
            AuthName "Staging"
            AuthUserFile /etc/passwd
            Require valid-user
    </Directory>

But, I need one file to be publically accessible (a 3rd party service needs to ping it, but can't handle Basic Authentication. Is it possible to "turn off" authentication fo开发者_开发百科r a specific file ("specific-file.php")?

I was looking into:

    <Files "/var/www/html/specific-file.php">
            ### SOMETHING
    </Files>

but it is not clear to me how to disable the protection.

Thanks!


This works for me:

Allow from all
Satisfy any


what happens when you use following?

<Files "/var/www/html/specific-file.php">
        Order Deny, Allow
        Allow from all
        AuthType none
        Satisfy Any 
</Files>

or a try a combination of above.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜