gpt4 book ai didi

apache - 无法提供目录/var/www/html/: No matching DirectoryIndex

转载 作者:太空宇宙 更新时间:2023-11-03 13:45:22 24 4
gpt4 key购买 nike

我确信这个问题已经被提出并得到了回答,但我没有找到解决方案。我有一个刚刚添加了 SSL 的虚拟主机,但它没有按预期工作。非 SSL 版本工作正常。以下是我在 httpd.conf 中得到的内容:

<VirtualHost mysite.com:443>
ServerAdmin email@myemail.com
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /var/www/html/www.mysite.com

<Directory /var/www/html/www.mysite.com>
DirectoryIndex index.html index.htm index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>

SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/my.crt
SSLCertificateKeyFile /etc/pki/tls/private/my.key
</VirtualHost>

我得到的错误是:

[Thu Jan 11 12:29:58.984354 2018] [autoindex:error] [pid 19998] [client 
IP:38470] AH01276: Cannot serve directory /var/www/html/: No matching
DirectoryIndex (index.html,index.php) found, and server-generated directory
index forbidden by Options directive

显然,我已将目录设置为/var/www/html/www.mysite.com,但它试图直接从/var/www/html 提供内容。

我敢肯定这很简单,但我的大脑已经因为在这个网站上工作了一整天而变得疲惫不堪,所以我可能只是看不清眼前的东西。

谢谢!

最佳答案

修复它。正如我假设的那样,很简单。变化:

<VirtualHost mysite.com:443>

收件人:

<VirtualHost *:443>

关于apache - 无法提供目录/var/www/html/: No matching DirectoryIndex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48207386/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com