gpt4 book ai didi

linux - LAMP vhost 仍然指向 www/html

转载 作者:太空宇宙 更新时间:2023-11-04 05:18:51 24 4
gpt4 key购买 nike

我在 /etc/apache2/sites-available/lion.dev 中创建了以下虚拟主机文件:

<VirtualHost *:80>
ServerAdmin webmaster@lion.dev
ServerName lion.dev

DocumentRoot /var/www/lion.dev
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/lion.dev/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

CustomLog /var/log/apache2/lion.dev/access.log combined
ErrorLog /var/log/apache2/lion.dev/error.log
</VirtualHost>

问题是,当我在浏览器中访问 lion.dev 时,它实际上指向 /www/html 文件夹。

我缺少什么以及为什么这不起作用?

最佳答案

您是否取消了 httpd.conf 文件中加载虚拟主机的注释?这通常被注释掉,模块不会被加载,只需删除虚拟主机部分之前的//即可。很抱歉我很晚才看到您解决了问题。

关于linux - LAMP vhost 仍然指向 www/html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44908455/

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