在虚拟主机上托管页面时发现 302,Ubuntu

302 Found while hosting page on virtualhost, Ubuntu

所以我正在尝试在 apache 上托管一个网页,ubuntu 平台使用虚拟主机概念。到目前为止,我做了这些更改。

它的内容是:

<VirtualHost *:80>
        ServerName test.com
        ServerAlias www.test.com
        ServerAdmin admin@test.com
        DocumentRoot /var/www/test
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

现在,当我尝试 curl test.com 时,我不知从哪里得到了这个奇怪的输出

输出:

$ curl test.com
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.9.15</center>
</body>
</html>

我不明白这里发生了什么,这个网页是从哪里来的,我应该如何修复它才能获得我想要的网页。我没有在我的机器上安装 nginx。请帮忙。

将 test.com 指向 HOSTS 文件中的本地主机。那至少会让你 "test" 你的配置