Home >Backend Development >PHP Tutorial > apache子域名设立
apache子域名设置
本地的环境,apache的配置文件中设置的根目录是d:/AppServ/www/,子域名的配置如下,放在配置文件开始了
<br /> NameVirtualHost *:80<br /> <br /> <VirtualHost *:80><br /> ServerName localhost<br /> ServerAlias localhost<br /> DocumentRoot D:/AppServ/www/<br /> <br /> <Directory D:/AppServ/www/><br /> # AllowOverride FileInfo Options<br /> Options None<br /> Order allow,deny<br /> Allow from all<br /> </Directory><br /> </VirtualHost><br /> <br /> <VirtualHost *:80><br /> ServerName dede<br /> ServerAlias dede<br /> DocumentRoot D:/AppServ/www/Dede/<br /> <br /> <Directory D:/AppServ/www/Dede/><br /> # AllowOverride FileInfo Options<br /> Options None<br /> Order allow,deny<br /> Allow from all<br /> </Directory><br /> </VirtualHost><br /> <br /> <VirtualHost *:80><br /> ServerName ikaihui<br /> ServerAlias ikaihui<br /> DocumentRoot D:/AppServ/www/ikaihui/<br /> <br /> <Directory D:/AppServ/www/ikaihui/><br /> # AllowOverride FileInfo Options<br /> Options None<br /> Order allow,deny<br /> Allow from all<br /> </Directory><br /> </VirtualHost><br />
错误 103 (net::ERR_CONNECTION_ABORTED):未知错误。
NameVirtualHost *:80<br /> <br /> <VirtualHost *:80><br /> ServerName localhost<br /> DocumentRoot /AMP/web<br /> </VirtualHost><br /> <br /> <VirtualHost *:80><br /> ServerName www.a.net<br /> DocumentRoot /AMP/web/www.a.net<br /> </VirtualHost><br /> <br /> <VirtualHost *:80><br /> ServerName www.b.net<br /> DocumentRoot /AMP/web/www.b.net<br /> </VirtualHost><br />