Apache NameVirtualHost 0.0.0.0:80没有虚拟主机
我的服务器工作正常,但发生了一些变化,我不知道发生了什么 我遇到以下错误,无法获取某些子域Apache NameVirtualHost 0.0.0.0:80没有虚拟主机,apache,ubuntu,apache2,config,Apache,Ubuntu,Apache2,Config,我的服务器工作正常,但发生了一些变化,我不知道发生了什么 我遇到以下错误,无法获取某些子域 apache2: Could not reliably determine the server's fully qualified domain name, using 2001:.....:a669 for ServerName [Sat Dec 14 21:20:36 2013] [warn] NameVirtualHost 0.0.0.0:80 has no VirtualHosts ..
apache2: Could not reliably determine the server's fully qualified domain name, using 2001:.....:a669 for ServerName
[Sat Dec 14 21:20:36 2013] [warn] NameVirtualHost 0.0.0.0:80 has no VirtualHosts
...
[Sat Dec 14 21:20:36 2013] [warn] NameVirtualHost 0.0.0.0:80 has no VirtualHosts
Syntax OK
我已尝试将ports.conf更改为Listen 80和Listen 0.0.0:80(请参阅)
这是我的一个vhost文件
NameVirtualHost 0.0.0.0:80
Listen 0.0.0.0:80
<VirtualHost 0.0.0.0:80>
ServerName www.domain.us
ServerAlias domain.us
ServerAdmin email@domain.us
DocumentRoot /home/valid_domain_path/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/valid_domain_path/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/www.domain.us.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
CustomLog ${APACHE_LOG_DIR}/www.domain.us.access.log combined
NameVirtualHost 0.0.0.0:80
听0.0.0.0:80
服务器名www.domain.us
ServerAlias domain.us
服务器管理员email@domain.us
DocumentRoot/home/valid\u domain\u path/www
选项如下符号链接
不允许超限
选项索引跟随符号链接多视图
允许超越所有
命令允许,拒绝
通融
ErrorLog${APACHE_LOG_DIR}/www.domain.us.error.LOG
#可能的值包括:调试、信息、通知、警告、错误、临界值、,
#警惕,埃默格。
日志级别信息
CustomLog${APACHE_LOG_DIR}/www.domain.us.access.LOG
默认值已正确链接
Apache 2.2.22
谢谢,如果我的怀疑是对的,并且您的系统最近已经更新,那么您现在使用的是Apache 2.4而不是2.2,就像许多刚刚(得到)迁移到新Ubuntu 13.10版本的用户一样。(如果您尚未更改为Apache 2.4,那么现在可能是更新新的*.conf文件的好时机。) 下面是关于如何使基于命名的VirtualHost在Apache 2.4中工作的一个非常好的解释: 实质上:
ServerName www.example.com
<VirtualHost *:80>
# This first-listed virtual host is also the default for *:80
ServerName www.example.com
ServerAlias example.com
DocumentRoot /www/domain
</VirtualHost>
<VirtualHost *:80>
ServerName other.example.com
DocumentRoot /www/otherdomain
</VirtualHost>
#第一个列出的虚拟主机也是*:80的默认主机
服务器名www.example.com
ServerAlias example.com
DocumentRoot/www/domain
ServerName other.example.com
DocumentRoot/www/otherdomain
您是否在一个vhost文件下配置了所有虚拟主机?否,它们是单独的文件。我刚刚更改了服务器主机文件中的一些名称,似乎一切正常,但在启动时仍会出现错误。是否可以发布其他vhost config文件的详细信息,只有stanzas.NameVirtualHost 0.0.0.0:80后面的vhost声明才是Listen 0.0.0.0:80除了目录和服务器名已更改外,其他的看起来都是一样的。你确定还有Apache 2.2.22吗?很多用户在升级到Ubuntu13.10后都有这些问题,Ubuntu13.10使用的是Apache2.4。。。