小编Pra*_*ngh的帖子

为子域启用 www 和非 www url

我目前在 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 记录如下所示:- 在此处输入图片说明

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

谢谢 !

domain-name-system subdomain apache-2.2

-1
推荐指数
1
解决办法
338
查看次数

标签 统计

apache-2.2 ×1

domain-name-system ×1

subdomain ×1