我目前在 linode 上使用 apache 来托管我的网站。我使用了许多子域,每个子域只能通过非 www url 访问。www url 给出 503 错误。
但是,我希望可以从两种类型的 url 访问我的域。制作虚拟站点的典型配置如下所示:-
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin atiprashant@xyz.com
ServerName www.mobiles.xyz.com
ServerAlias mobiles.xyz.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /home/prashant/public/xyz.com/public/mobiles
# Log file locations
LogLevel warn
ErrorLog /home/prashant/public/xyz.com/public/mobiles/log/error.log
CustomLog /home/prashant/public/xyz.com/public/mobiles/log/access.log combined
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
linode 的 A/AAAA 记录如下所示:-

谁能告诉我我的方法有什么问题?如果我在提出疑问时不清楚,请发表评论。
谢谢 !