apache二级域名配置问题
现在在apache中配置两个二级域名,其中一个域名能正常对应到目录的网站,另外一个却还是对应到第一个域名的目录,然后我在本地打开http://localhost/打开的是第一个域名对应的目录的网站,以下是apache的htdocs目录的结构:
bbs --子目录bbs
uc --子目录uc
index.html --根目录
以下是httpd.conf文件内容:
ServerRoot "D:/SOFT_PHP_PACKAGE/apache"Listen 80LoadModule actions_module modules/mod_actions.soLoadModule alias_module modules/mod_alias.soLoadModule asis_module modules/mod_asis.soLoadModule auth_basic_module modules/mod_auth_basic.soLoadModule authn_default_module modules/mod_authn_default.soLoadModule authn_file_module modules/mod_authn_file.soLoadModule authz_default_module modules/mod_authz_default.soLoadModule authz_groupfile_module modules/mod_authz_groupfile.soLoadModule authz_host_module modules/mod_authz_host.soLoadModule authz_user_module modules/mod_authz_user.soLoadModule autoindex_module modules/mod_autoindex.soLoadModule cgi_module modules/mod_cgi.soLoadModule dir_module modules/mod_dir.soLoadModule env_module modules/mod_env.soLoadModule include_module modules/mod_include.so#LoadModule info_module modules/mod_info.soLoadModule isapi_module modules/mod_isapi.soLoadModule log_config_module modules/mod_log_config.soLoadModule mime_module modules/mod_mime.so#LoadModule mime_magic_module modules/mod_mime_magic.soLoadModule negotiation_module modules/mod_negotiation.soLoadModule setenvif_module modules/mod_setenvif.soLoadModule php5_module "D:/SOFT_PHP_PACKAGE/php/php5apache2_2.dll"<IfModule !mpm_netware_module><IfModule !mpm_winnt_module>User daemonGroup daemon</IfModule></IfModule>ServerAdmin admin@localhost.comServerName 192.168.21.28:80DocumentRoot "D:/SOFT_PHP_PACKAGE/apache/htdocs"<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Allow from all</Directory><Directory "D:/SOFT_PHP_PACKAGE/apache/htdocs"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all</Directory><IfModule dir_module> DirectoryIndex index.html index.htm index.php default.php</IfModule><FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All</FilesMatch>ErrorLog "logs/error.log"LogLevel warn<IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog "logs/access.log" common</IfModule><IfModule alias_module> ScriptAlias /cgi-bin/ "D:/SOFT_PHP_PACKAGE/apache/cgi-bin/"</IfModule><IfModule cgid_module></IfModule><Directory "D:/SOFT_PHP_PACKAGE/apache/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all</Directory>DefaultType text/plain<IfModule mime_module> TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType text/html .html .shtml AddOutputFilter INCLUDES .html .shtml</IfModule><IfModule ssl_module>SSLRandomSeed startup builtinSSLRandomSeed connect builtin</IfModule>NameVirtualHost 192.168.21.28:80<VirtualHost *:80>DocumentRoot D:/SOFT_PHP_PACKAGE/apache/htdocs/bbs/ServerName bbs.test.com.cnErrorLog logs/bbs.test.com.cn-error.logTransferLog logs/bbs.test.com.cn-access.log</VirtualHost> <VirtualHost *:80>DocumentRoot D:/SOFT_PHP_PACKAGE/apache/htdocs/uc/ServerName hylxs.test.com.cnErrorLog logs/hylxs.test.com.cn-error.logTransferLog logs/hylxs.test.com.cn-access.log</VirtualHost>