【发布时间】:2018-10-06 07:34:21
【问题描述】:
我有一个 DO droplet (Ubuntu 18.04),我想在其上托管两个站点。假设液滴的 IP 为 101.1.1.1。现在我希望站点从另一台服务器(具有不同的 IP,比如说 104.1.1.1.)子域指向。假设 siteone.example.org 和 sitetwo.example.org。所以我按照指南设置我的 Apache VirtualHost,如下所示:
<VirtualHost *:80>
ServerAdmin webmaster@example.org
ServerName siteone.example.org
ServerAlias www.siteone.example.org
DocumentRoot /var/www/siteone/public_html
<Directory /var/www/siteone/public_html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
但是,当我在浏览器中按 siteone.example.org 时,我没有得到任何响应。我在两端都设置了 A 名称以指向 101.1.1.1。是不是我做错了什么?
【问题讨论】:
标签: apache