[英]How to install ssl certificate with Apache and Nginx
我有一个 Ubuntu 20.04 服务器运行 Apache 和 Nginx。 我想使用 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 证书
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.