Apache 设置 000-default.conf 文件

2024-03-29

我确信这是一个简单的问题:

我已经流浪了一台机器并设置了 LAMP,IP 配置为 10.0.0.10。

在我的 Windows 计算机中,我修改了主机文件并添加了一个名为“rsywx_remote”的条目。从我的 Windows 机器到我的 vagrant 机器的 ping 正常。从我的 Windows 机器在浏览器中加载“rsywx_remote”也可以。连接性没有问题。

然后我通过 SSH 连接到我的 vagrant 机器并修改了/etc/apache2/sites-enabled/000-default.conf像这样:

<VirtualHost 127.0.0.1>
        DocumentRoot "/www/rsywx/web"
        ServerName rsywx_remote
        ServerAlias rsywx_remote

        <Directory "/www/rsywx/web">
                Options FollowSymLinks Indexes
                AllowOverride All
                Order deny,allow
                Allow from 127.0.0.1
                Deny from all
                Require all granted
        </Directory>
</VirtualHost>

重新启动我的 vagrant Apache 服务,它仍然指向默认页面,而不是我期望的页面。

有什么提示吗?


Try:

<VirtualHost *:80>

这将监听所有地址

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Apache 设置 000-default.conf 文件 的相关文章

随机推荐