map $http_upgrade $connection_upgrade {
	default upgrade;
	'' close;
}

server {
	listen 80;
	listen [::]:80;
	server_name blog.jackyu.cn test.jackyu.cn;

	location /.well-known/acme-challenge {
		proxy_set_header Host $host;
		proxy_set_header X-Real_IP $remote_addr;
		proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
		proxy_pass http://127.0.0.1:9180;
	}

}

server {
    listen  443       ssl;
    listen  [::]:443  ssl;
    http2   on;
	server_name blog.jackyu.cn test.jackyu.cn;
	ssl_certificate /etc/nginx/ssl/blog.jackyu.cn_test.jackyu.cn/fullchain.cer;
	ssl_certificate_key /etc/nginx/ssl/blog.jackyu.cn_test.jackyu.cn/private.key;
	include enable-php-8.conf;

	location /.well-known/acme-challenge {
		proxy_set_header Host $host;
		proxy_set_header X-Real_IP $remote_addr;
		proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
		proxy_pass http://127.0.0.1:9180;
	}

}

