我想在我的 apche2 中启用一些子域。我创建了一些 vhost 文件,但在每个子域上我总是得到相同的页面。如果我只启用其中一个文件,我就会得到这个 DocumentRoot 的页面...
这是我的配置:
apache2.conf(部分):
# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf
# Include list of ports to listen on and which to use for name based vhosts
Include ports.conf
站点可用/域名.de:
<VirtualHost *:80>
ServerName domain.de
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /home/..../
<Directory /home/..../>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
</VirtualHost>
站点可用/webmail.domain.de:
<VirtualHost *:80>
ServerName webmail.domain.de
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /var/www/webmail/
<Directory /var/www/webmail/>
# This relaxes Apache security settings.
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/www/webmail/log/mail.domain.de.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
</VirtualHost>
我已经使用 a2ensite 启用了它们并且重新启动了 apache2。
在我的 DNS 配置中,我为我的 IP 地址设置了一条主机“*”的 A 记录
系统信息:Debian GNU/Linux 7.6 (wheezy) Apache/2.2.22
有人能帮帮我吗?谢谢你的帮助!