Nginx在ssh后面进行基本身份验证

时间:2019-04-26 11:44:21

标签: nginx centos

我正在通过nginx使用int([x]) int(x, base=10) 连接-我想在用户打开端口9201时进行授权。

如果我有这样的事情:

class PurchaseTime {

    var id: Int!
    var title: String!
    init(id: Int, title: String) {

        self.id = id
        self.title = title
    }
}

enum PurchaseTimeType: Int,CaseIterable {
    case ASAP, ThisMonth, NextMonth

    var instance: PurchaseTime {

        switch self {

            case .ASAP:        return PurchaseTime(id: 1, title: "ASAP")
            case .ThisMonth:   return PurchaseTime(id: 2, title: "This Month")
            case .NextMonth:   return PurchaseTime(id: 3, title: "Next Month")
        }
    }
}

PurchaseTimeType.ASAP.instance.id
PurchaseTimeType.ASAP.instance.title


let id = 1
if let type = PurchaseTimeType.allCases.first(where: { $0.instance.id == id } ) {
    print(type.instance.title)
}

我遇到错误

  

nginx [8698]:nginx:[emerg]此处不允许使用“位置”指令   在/etc/nginx/nginx.conf:44

我如何在这里进行授权? 如果我删除sudo chmod -R 777 storage/* 行,则此nginx可以正常工作,但未经授权。

0 个答案:

没有答案
相关问题