我有 Ubuntu 16.04.1 VPS 并在那里安装了 apache2 以及 PHP7、fail2ban 和其他东西。
我还为我的域名(XXXXX.XX)设置了一个 VirtualHost,将其链接到 /var/www/html/twido-demo,但该网站从 /var/www/html 加载内容。
我做错什么了?
文件 /etc/apache2/sites-available/twido.conf
<VirtualHost *:80>
ServerName XXXXX.XX
ServerAlias www.XXXXX.XX
DocumentRoot /var/www/html/twido-demo
<Directory /var/www/html/twido-demo>
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/myproject-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/myproject-access.log combined
</VirtualHost>
文件 /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
XX.2.241.236 XXXXX.XX
你能看出其中的错误吗?