Nginx-密码保护整个网站,但保持一个文件夹打开 [英] Nginx - Password Protect an entire website but keep one folder open

查看:64
本文介绍了Nginx-密码保护整个网站,但保持一个文件夹打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在保留用于开发(测试)的服务器上使用Nginx,并且我们希望阻止公司外部的任何人访问正在开发的网站.但是,其中一个站点使用在线支付,因此任何人都必须可以访问该文件夹,用于信用卡公司的回拨.

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 ?

此致

Wael

推荐答案


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

这篇关于Nginx-密码保护整个网站,但保持一个文件夹打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆