From ee582891fa21753585002506a7456f5bc6fa872e Mon Sep 17 00:00:00 2001 From: William Mantly Date: Thu, 8 Aug 2024 08:38:51 -0400 Subject: [PATCH] Fixed nginx conf issue --- ops/nginx_conf/nginx.conf | 4 ++-- ops/nginx_conf/proxy.conf | 5 +++-- ops/nginx_conf/show.py | 8 ++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 ops/nginx_conf/show.py diff --git a/ops/nginx_conf/nginx.conf b/ops/nginx_conf/nginx.conf index 72045af..0defeb3 100644 --- a/ops/nginx_conf/nginx.conf +++ b/ops/nginx_conf/nginx.conf @@ -25,12 +25,12 @@ http { auto_ssl = (require "resty.auto-ssl").new() auto_ssl:set("storage_adapter", "resty.auto-ssl.storage_adapters.redis") auto_ssl:set("allow_domain", function(domain) - ngx.log(ngx.ERR, "nginx.conf allow_domain", domain) + ngx.log(ngx.ERR, "!!!!!!!! nginx.conf allow_domain !!!!!!!!!! ", domain) return ngx.ctx.toAllow end) auto_ssl:set("request_domain", function(ssl, ssl_options) - ngx.log(ngx.ERR, "nginx.conf request_domain", domain) + ngx.log(ngx.ERR, "!!!!!! nginx.conf request_domain !!!!!!!", domain) local json = require "cjson" local redis = require "resty.redis" diff --git a/ops/nginx_conf/proxy.conf b/ops/nginx_conf/proxy.conf index 390b067..bbed1cd 100644 --- a/ops/nginx_conf/proxy.conf +++ b/ops/nginx_conf/proxy.conf @@ -20,10 +20,11 @@ server { set $header_host $host; access_by_lua ' + ngx.log(ngx.ERR, "!!!!!!!!! proxy.conf !!!!!!!! ", domain) local res = ngx.ctx.targetInfo if not res then - ngx.log(ngx.ERR, "no host found for key ", domain) - ngx.exit(406) + ngx.log(ngx.ERR, "This should not happen", domain) + ngx.exit(499) return false end diff --git a/ops/nginx_conf/show.py b/ops/nginx_conf/show.py new file mode 100644 index 0000000..e68cb16 --- /dev/null +++ b/ops/nginx_conf/show.py @@ -0,0 +1,8 @@ +members = ['Roisin', 'Billy', 'Joseph', 'Emily', 'Chloe'] + +message = "I love you {}" + +for member in members: + if member == "Billy": + continue + print(message.format(member)) \ No newline at end of file