【发布时间】:2018-07-15 18:46:20
【问题描述】:
我已将 Nginx 服务器设置为 Python/WSGI Web 应用程序的反向代理。这是启用站点的配置文件:
server {
listen 80;
server_name mydomain.com;
location = /favicon.ico { access_log off; log_not_found off; }
location / {
include uwsgi_params;
uwsgi_pass unix:/home/user/webapp/webapp.sock;
}
我可以将 certbot 用于一个设置,其中 Nginx 不是反向代理,它的工作原理很吸引人,但是在上面的配置中,当我运行 certbot 时出现以下错误:"Could not automatically find a matching server block for mydomain.com. Set theserver_namedirective to use the Nginx installer"。根据1 的说法,它看起来像是 Nginx 的错误配置。我基于此answer 创建了证书,但我不知道如何配置 nginx 以使用此新证书接受 https,而它是反向代理。
【问题讨论】:
标签: nginx reverse-proxy lets-encrypt