diff --git a/conf/local_macos/ai.conf b/conf/local_macos/ai.conf index 4a4a733..6fdb617 100644 --- a/conf/local_macos/ai.conf +++ b/conf/local_macos/ai.conf @@ -1,18 +1,20 @@ server { -# https://serverfault.com/questions/798734/use-variable-for-server-name-in-nginx# -# server_name $servername; +# https://serverfault.com/questions/798734/use-variable-for-server-name-in-nginx# +# server_name $servername; server_name "ai.localhost"; -# listen 443 ssl; -# listen 80; +# listen 443 ssl; +# listen 80; + listen 8088; client_max_body_size 10M; # disable in local test env -# ssl_certificate /etc/letsencrypt/live/alchemy-studio.cn/fullchain.pem; # managed by Certbot -# ssl_certificate_key /etc/letsencrypt/live/alchemy-studio.cn/privkey.pem; # managed by Certbot +# ssl_certificate /etc/letsencrypt/live/alchemy-studio.cn/fullchain.pem; # managed by Certbot +# ssl_certificate_key /etc/letsencrypt/live/alchemy-studio.cn/privkey.pem; # managed by Certbot location / { try_files $uri $uri/ /index.html; - proxy_set_header Host "ai.alchemy-studio.cn"; + # proxy_set_header Host "ai.alchemy-studio.cn"; + proxy_set_header Host "ai.localhost"; proxy_set_header X-Real-IP $remote_addr; # disable in local test env # proxy_set_header X-Forwarded-Proto https; diff --git a/conf/local_macos/music-room.conf b/conf/local_macos/music-room.conf index 8d000f0..022ae8d 100644 --- a/conf/local_macos/music-room.conf +++ b/conf/local_macos/music-room.conf @@ -21,7 +21,6 @@ server { root $resty_loc/nginx/html/music-room; index index.html; - # # 公众号校验 # location /MP_verify_Jo6pKmy43wx7S5Sh.txt { # return 200 'Jo6pKmy43wx7S5Sh'; diff --git a/conf/local_macos/nginx.conf b/conf/local_macos/nginx.conf index 44b0050..0f83ad2 100644 --- a/conf/local_macos/nginx.conf +++ b/conf/local_macos/nginx.conf @@ -1,4 +1,3 @@ - # put into /usr/local/etc/openresty/nginx.conf #user nobody; worker_processes 1; @@ -9,16 +8,14 @@ error_log /usr/local/etc/openresty/logs/error.log debug; #pid logs/nginx.pid; - events { worker_connections 1024; } - http { include mime.types; default_type application/octet-stream; - resolver 8.8.8.8 ipv6=off; + resolver 8.8.8.8 ipv6=off; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' @@ -85,7 +82,6 @@ http { include /usr/local/etc/openresty/conf.d/*.conf; - # another virtual host using mix of IP-, name-, and port-based configuration # #server { @@ -99,7 +95,6 @@ http { # } #} - # HTTPS server # #server { @@ -120,6 +115,4 @@ http { # index index.html index.htm; # } #} - - }