如何解决如何使用 Apache 和 Nginx 安装 ssl 证书
我有一台运行 Apache 和 Nginx 的 Ubuntu 20.04 服务器。我想使用 Certbot 添加 SSL 证书,但我不知道如何继续。
我的项目由一个 django api 和一个 Vue js 前端组成。 Nginx 负责 API,apache 作为反向代理。
我的 Apache 000-default.conf 文件
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName ***.***.** <- My IP
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
</VirtualHost>
我的 Nginx 配置
upstream django {
server unix:///home/backend/mysite.sock;
}
server {
listen 8000;
server_name mysite.com;
charset utf-8;
client_max_body_size 75M;
location /media {
alias /home/backend/media;
}
location /static {
alias /home/backend/static;
}
location / {
uwsgi_pass django;
include /home/backend/uwsgi_params;
}
}
如果有人告诉我如何使用此配置使用 Certbot 安装 ssl 证书,谢谢
解决方法
您可以从这里开始:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。