首页 文章

在xampp Apache Ubuntu上安装Certbot

提问于
浏览
0

我尝试使用以下命令设置SSL证书:https://certbot.eff.org/lets-encrypt/ubuntuxenial-apache documentation .

它工作,唯一的问题是它在错误的Apache服务器上 . 我的Ubuntu 16.04系统上有2台Apache服务器 . 1链接到/ var / www / html,另一个(这是我的XWAMPP服务器)链接到/ opt / lampp / htdocs

在此服务器上链接到/ var / www / html的Apache服务器已激活SSL . 使用以下命令: sudo certbot --apache

我希望它在XAMPP的Apache服务器上激活 . 如何编辑此命令以便调用其他Apache服务器?

1 回答

  • 1

    它会工作,但为此你需要和静态IP和前端80和443到您的系统IP和链接与域,你可以尝试没有IP他们将给你免费域后,你需要访问https://www.sslforfree.com/之后,按照他们说的步骤 . 验证后,您可以下载ssl文件 . 你需要将提取文件放在C:\ xampp \ apache \ conf中

    在此之后转到C:\ xampp \ apache \ conf \ extra

    并编辑httpd-vhosts.conf以及以下内容,您可以根据您的域或根目录进行更改

    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host2.example.com
        DocumentRoot "C:/xampp/htdocs/dummy-host2.example.com"
        ServerName dummy-host2.example.com
        ErrorLog "logs/dummy-host2.example.com-error.log"
        CustomLog "logs/dummy-host2.example.com-access.log" common
    </VirtualHost>
    
    <VirtualHost *:443>
        ServerAdmin webmaster@osticket.dev
        DocumentRoot "C:/xampp/htdocs/upload"
        ServerName osticketamcat.ddns.net
        ServerAlias osticketamcat.ddns.net
        SSLEngine on
        SSLCACertificateFile "C:\xampp\apache\conf\ssl\ca_bundle.crt"
        SSLCertificateFile "C:\xampp\apache\conf\ssl.crt\server.crt"
        SSLCertificateKeyFile "C:\xampp\apache\conf\ssl.key\server.key"
        ErrorLog "logs/dummy-host.example.com-error.log"
        CustomLog "logs/dummy-host.example.com-access.log" common
        <Directory "C:/xampp/htdocs/upload">
            Options Indexes FollowSymLinks MultiViews
            AllowOverride all
            Order Deny,Allow
            Allow from all
            Require all granted
    </Directory>
    

相关问题