HTTPS在本地主机上有效,但不适用于网站(虚拟主机)

时间:2018-07-26 21:55:04

标签: https openssl virtualhost wampserver

在Wampserver配置和Openssl中进行了大量操作之后,我设法为本地主机获取HTTPS。 https://localhost有用!

但是当我基于虚拟主机尝试https://my-localhost-site时,那是行不通的。

解决此问题的步骤是什么?

我尝试将httpd-vhosts.conf 80更改为443,但是wampserver无法重新启动。

httpd-vhosts.conf

<VirtualHost *:443> //80 -> 443
    ServerName 4-9-6-en.wp-dev
    DocumentRoot "e:/programs/wamp64/www/wordpress-4.9.6/wordpress"
    <Directory  "e:/programs/wamp64/www/wordpress-4.9.6/wordpress/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

<VirtualHost *:443> //80 -> 443
    ServerName 4-9-6-fr.wp-dev
    DocumentRoot "e:/programs/wamp64/www/wordpress-4.9.6-fr_fr/wordpress"
    <Directory  "e:/programs/wamp64/www/wordpress-4.9.6-fr_fr/wordpress/">
        Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

0 个答案:

没有答案