【发布时间】:2018-01-17 23:45:00
【问题描述】:
我遵循了以下说明:virtual host、https。
当我为我的 locas 托管网站使用 DynDNS 时,我的最终 000-default.conf 看起来像这样:
<VirtualHost *:443>
ServerName www.mydomain.dyndns.xx
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/mydomain.dyndns.xx/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/ca.crt
SSLCertificateKeyFile /etc/apache2/ssl/ca.key
ErrorLog ${APACHE_LOG_DIR}/www.virtualhost1.com_error.log
CustomLog ${APACHE_LOG_DIR}/www.virtualhost1.com_access.log combined
</VirtualHost>
我另外在/etc/apache2/apache.conf下面配置了:
<Directory /var/www/html/mydomain.dyndns.xx>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
在/etx/host
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi
192.168.x.x www.mydomain.dyndns.xx
当我尝试打开页面的 URL 时,它在端口 80 上显示“Indes of /”,当我点击这些文件时,我得到 http://mydomain.dyndns.xx/mydomain.dyndns。 xx.index.php
如果我调用 https://,那么我的浏览器上会出现 ERR_CONNECTION_REFUSED。
感谢您的帮助!
【问题讨论】:
标签: ssl-certificate virtualhost indexof self-signed apache2.4