我有一个网站运行的Debian服务器,我想创build子域,所以我创build的文件在网站,可用的目录。 在文件中:
<VirtualHost *:80> ServerName shop.domain.com DirectoryIndex index.php Header unset ETag FileETag None AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript #php_flag register_globals off #php_flag safe_mode off #php_flag magic_quotes_gpc off DocumentRoot "/var/www/shop" <Directory "/var/www/shop"> AllowOverride None Allow from All Options FollowSymLinks ExecCGI </Directory> </VirtualHost>
然后命令:
a2ensite filename /etc/init.d/apache2 reload
已启用网站的子域名已创build,但子域名不存在(“未find服务器”)。
我不是很有经验,所以…谢谢!
如果VHostconfiguration不正确,你会看到你的web服务器的默认页面(就像你在服务器上打开127.0.0.1一样,但是“Server not found”意味着DNS无法parsing。