apache2.2中配置虚拟主机后,不执行跳转

apache2.2中配置虚拟主机后,不执行跳转

ServerRoot "D:/tomcat/Apache2.2"

Listen 80

NameVirtualHost *.com:80   
#(1)转mis:
<VirtualHost *.com:80>
    ServerAdmin master@xdz.com
    ServerName t55.51bsi.com
    DocumentRoot E:/hostsTest/host2/ROOT
    ErrorLog logs/t55.51bsi.com_error_log.log
    CustomLog logs/t55.51bsi.com_access_log.log common
    RewriteEngine On
    RewriteRule ^/(.*)$ http://t55.51bsi.com:81/$1 [P,L]
</VirtualHost>
#(2)转政务网主站
<VirtualHost *.com:80>
    ServerAdmin master@dqzs.xdz.com
    ServerName t60.51bsi.com
    DocumentRoot E:/hostsTest/host3/ROOT
    ErrorLog logs/t60.51bsi.com_log.log
    CustomLog logs/t60.51bsi.com_log.log common
    RewriteEngine On
    RewriteRule ^/(.*)$ http://t60.51bsi.com:82/$1 [P,L]
</VirtualHost>

LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_alias_module modules/mod_authn_alias.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule dumpio_module modules/mod_dumpio.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule filter_module modules/mod_filter.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule logio_module modules/mod_logio.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule ssl_module modules/mod_ssl.so
#LoadModule status_module modules/mod_status.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

User daemon
Group daemon

</IfModule>
</IfModule>

ServerAdmin zcp@51bsi.com

#ServerName 192.168.123.152:80

DocumentRoot "D:/tomcat/Apache2.2/htdocs"

<Directory />
    Options FollowSymLinks
    AllowOverride all
    Order deny,allow
    allow from all
</Directory>

<Directory "D:/tomcat/Apache2.2/htdocs">

    #Options Indexes FollowSymLinks
    Options FollowSymLinks

    AllowOverride all

    Order allow,deny
    Allow from all

</Directory>

<IfModule dir_module>
    DirectoryIndex index.html
</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>
      # You need to enable mod_logio.c to use %I and %O
      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:/tomcat/Apache2.2/cgi-bin/"

</IfModule>

<IfModule cgid_module>
   
</IfModule>

<Directory "D:/tomcat/Apache2.2/cgi-bin">
    AllowOverride all
    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

</IfModule>


<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>


以上是我的配置文件,有那位大侠帮小弟看看。在线等待。
加一句:
RewriteLog "D:/tomcat/Apache2.2/logs/rewrite.log"

把LOG贴出来
t55.51bsi.com_error_log.log的内容:
[Sat Mar 22 16:38:56 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:40:17 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:43:11 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:43:22 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:43:22 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 16:44:54 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:45:24 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:45:24 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 16:50:42 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:54:30 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:54:30 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 16:54:35 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:54:35 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 16:54:36 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 16:54:37 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:09:20 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:10:17 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:10:36 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:10:36 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:10:40 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:11:39 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:11:41 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:12:50 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:12:50 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:13:19 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:13:19 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:18:25 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:18:25 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:28:18 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:28:26 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:28:27 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:31:28 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:31:50 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:31:55 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:33:47 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:34:31 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:34:31 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:35:22 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:35:27 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:35:28 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:39:19 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:41:03 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/, referer: http://localhost/
[Sat Mar 22 17:41:03 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:42:30 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/, referer: http://localhost/
[Sat Mar 22 17:42:30 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:43:18 2008] [error] [client 192.168.123.152] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:43:26 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:43:26 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
[Sat Mar 22 17:55:04 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/
[Sat Mar 22 17:55:04 2008] [error] [client 127.0.0.1] attempt to make remote request from mod_rewrite without proxy enabled: proxy:http://t55.51bsi.com:81/favicon.ico
error.log内容:
[Sun Mar 23 16:02:57 2008] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sun Mar 23 16:02:57 2008] [notice] Child 5748: Exit event signaled. Child process is ending.
[Sun Mar 23 16:02:58 2008] [notice] Child 5748: Released the start mutex
[Sun Mar 23 16:02:59 2008] [notice] Child 5748: All worker threads have exited.
[Sun Mar 23 16:02:59 2008] [notice] Child 5748: Child process is exiting
[Sun Mar 23 16:02:59 2008] [notice] Parent: Child process exited successfully.
[Sun Mar 23 16:03:08 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
[Sun Mar 23 16:03:08 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
[Sun Mar 23 16:03:08 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.123.152 for ServerName
[Sun Mar 23 16:03:08 2008] [notice] Apache/2.2.8 (Win32) configured -- resuming normal operations
[Sun Mar 23 16:03:08 2008] [notice] Server built: Jan 18 2008 00:37:19
[Sun Mar 23 16:03:08 2008] [notice] Parent: Created child process 4232
[Sun Mar 23 16:03:08 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
[Sun Mar 23 16:03:08 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
[Sun Mar 23 16:03:08 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.123.152 for ServerName
[Sun Mar 23 16:03:09 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
[Sun Mar 23 16:03:09 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
[Sun Mar 23 16:03:09 2008] [error] (OS 11001)不知道这样的主机。  : Could not resolve host name *.com -- ignoring!
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.123.152 for ServerName
[Sun Mar 23 16:03:09 2008] [notice] Child 4232: Child process is running
[Sun Mar 23 16:03:09 2008] [notice] Child 4232: Acquired the start mutex.
[Sun Mar 23 16:03:09 2008] [notice] Child 4232: Starting 64 worker threads.
[Sun Mar 23 16:03:09 2008] [notice] Child 4232: Starting thread to listen on port 80.
请求没有被授权。看你配置文件 没有开proxy

不知道是不是模块编译问题,来个高手看看,我跟着学。



QUOTE:
原帖由 zhaocp 于 2008-3-22 18:34 发表
ServerRoot "D:/tomcat/Apache2.2"

Listen 80

NameVirtualHost *.com:80   
#(1)转mis:

    ServerAdmin master@xdz.com
    ServerName t55.51bsi.com
    DocumentRoot E:/hostsTest/host2/RO ...

NameVirtualHost yourip:80

看不懂的地方,81和82端口都没有侦听,跳转过去谁负责?
在httpd.conf里打开这两个

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

然后重启apache服务