我有域example.com
并test.example.com
在 apache 服务器上运行。出于某种原因,当我尝试访问test.example时,它被重定向到www.test.example并因此Server not found
在浏览器中显示错误。.htaccess(根和子域文件夹)文件都是空的。
其他事实
我有另一个子域xyz.example.com
指向 public_html/xyz 目录,其中包含一些内容(带有“hello world 消息”的 index.html),如果我使用 xyz.example.com 而不是 www.xyz.example.com,它可以正常工作。所以,你能帮我指出正确的方向吗?我有一个 vps,如果需要,我可以更改任何文件。
您可以在下面找到我的虚拟主机配置。
<VirtualHost xx.xxx.xxx:80>
ServerName test.example.com
ServerAlias www.test.example.com
DocumentRoot /home/example/public_html/test
ServerAdmin webmaster@test.example.com
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/test.example.com combined
CustomLog /usr/local/apache/domlogs/test.example.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
ScriptAlias /cgi-bin/ /home/example/public_html/test/cgi-bin/
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/example/test.example.com/*.conf"
</VirtualHost>
谢谢你的时间