服务器 Gind.cn

服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器

Apache2虚拟主机坏了; 在子域上显示默认的index.html,但在www.subdomain上正确的内容

我已经将Linodeconfiguration为Apache 2.2.14的Ubuntu 10.04.2 Web服务器。 我总共有4个站点,全部在/etc/apache2/sites-available下定义为虚拟主机。 所有站点几乎都是相同的克隆进行configuration。 而所有的网站,但我最后的工作成功。 default: (www.)exampleadnetwork.com (www.)example.com reseller.example.com trouble: client1.example.com 当我访问client1.example.com网站时,我不断收到此页面: 有用! 这是此服务器的默认网页。 networking服务器软件正在运行,但尚未添加内容。 在我的ports.conf文件中,我将NameVirtualHost正确设置为端口80上的IP地址。 如果我访问“www.sub.example.com”别名的网站工作! 如果我在没有www的情况下访问它,我会看到上面贴出的“It Works”摘录。 即使apache2ctl -S显示我的虚拟主机文件parsing正确,并被添加到混合。 我的虚拟主机configuration文件如下: <VirtualHost 127.0.0.1:80> ServerAdmin [email protected] ServerName client1.example.com ServerAlias client1.example.com www.client1.example.com DocumentRoot /srv/www/client1.example.com/public_html/ ErrorLog /srv/www/client1.example.com/logs/error.log CustomLog /srv/www/client1.example.com/logs/access.log combined <directory /srv/www/client1.example.com/public_html/> Options -Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </directory> </VirtualHost> 其他网站是以下的变体: […]