我有域名
以下是我的虚拟主机配置:
感谢您的时间。
example.com
和在apache服务器上运行的test.example.com
。由于某种原因,当我尝试访问test.example时,它会被重定向到www.test.example并显示浏览器中的Server not found
错误。两个.htaccess文件(根目录和子域文件夹)都为空。
其他事实
我有另一个子域xyz.example.com
指向public_html/xyz目录,并且里面有一些内容(带有“hello world message”的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>
感谢您的时间。