【问题标题】:How to install ssl certificate with Apache and Nginx如何使用 Apache 和 Nginx 安装 ssl 证书
【发布时间】:2021-01-24 03:08:34
【问题描述】:

我有一个运行 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 证书,谢谢您

【问题讨论】:

    标签: apache ubuntu nginx ssl-certificate certbot


    【解决方案1】:
    猜你喜欢
    • 2017-03-05
    • 2017-11-22
    • 2016-12-24
    • 2014-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多