Fixed nginx conf issue
This commit is contained in:
@@ -53,7 +53,6 @@ http {
|
|||||||
|
|
||||||
local ok, err = red:connect("127.0.0.1", 6379)
|
local ok, err = red:connect("127.0.0.1", 6379)
|
||||||
if not ok then
|
if not ok then
|
||||||
ngx.say('The domain is not allowed on this server.')
|
|
||||||
ngx.log(ngx.ERR, "failed to connect to redis: ", err)
|
ngx.log(ngx.ERR, "failed to connect to redis: ", err)
|
||||||
return ngx.exit(598)
|
return ngx.exit(598)
|
||||||
end
|
end
|
||||||
@@ -76,7 +75,7 @@ http {
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not res["ip"] then
|
if not res["ip"] then
|
||||||
ngx.log(ngx.ERR, "no host found for key ", domain)
|
ngx.say('The domain is not allowed on this server.')
|
||||||
ngx.exit(406)
|
ngx.exit(406)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user