我按照以下说明操作:virtual host,https。apache 2.4虚拟主机给我带来“Index of /”
因为我用一个DynDNS的为我的LOCA托管webside,我最终000-default.conf
看起来是这样的:
<VirtualHost *:443>
ServerName www.mydomain.dyndns.xx
ServerAdmin [email protected]
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>
我additionaly在/etc/apache2/apache.conf
配置的follwoing:
<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。
谢谢你的帮助!