Nginx - Password Protect an entire website but keep one folder open

一世执手 提交于 2019-12-02 01:44:20

问题


We're using Nginx on the server reserved for development (testing) and we want to prevent anyone outside the company from gaining access to the sites under development. However one of the sites uses online payment and for that a folder need to be accessible by anyone, used for the callback from the credit card company..

Is there any way we can protect an entire website but leave just one folder and all the files inside open ?

Regards,

Wael


回答1:


server {
        auth_basic "go away";
        location /a {
                auth_basic off;
        }
}


来源:https://stackoverflow.com/questions/5486433/nginx-password-protect-an-entire-website-but-keep-one-folder-open

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!