我在/ etc / nginx / sites-enabled中有一个名为domain.tld的配置文件,它配置了反向代理连接。文件看起来像这样:
server {
listen 80; server_name domain.tld
;
location / {
proxy_pass http://111.111.111.111:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
它充当魅力。现在我想删除配置,所以我删除了文件并重新启动了nginx。但配置似乎仍然有效。我的/etc/nginx/nginx.conf是完整的库存。我该怎么做才能删除配置?
答案 0 :(得分:0)
答案 1 :(得分:0)
当您更改listen指令时,您必须重新启动(而不仅仅是重新加载)nginx