configurationApache以反向代理特定的名称

我有一个工作的内部网服务器:

  1. 正确地为http:// hqmktgwb01 /
  2. 目前正确configuration为将代理从http:// hqmktgwb01 / dashstats反转为localhost:3000 – localhost:3003的循环
  3. 也有DNS名称dashstats (去相同的IP)

当前的工作configuration文件可以在这里find: http : //pastie.org/1426082

我想修改configuration,使:
4. http:// dashstats /执行相同的反向代理http:// hqmktgwb01 / dashstats 。

我试图通过修改这样的configuration来实现#4: http : //pastie.org/1426047 (增加第90-98行),但这不是一个有效的Apacheconfiguration。

请帮我修改原来的configuration文件来完成1-4以上。

我似乎已经得到它使用这个configuration工作: http : //pastie.org/1426986

我不确定这是否是最佳做法,但似乎是有效的。 包括下面的完整configuration以防Pastie宕机:

 ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2" Listen 80 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 authn_default_module modules/mod_authn_default.so LoadModule authn_file_module modules/mod_authn_file.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_user_module modules/mod_authz_user.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule cgi_module modules/mod_cgi.so LoadModule dir_module modules/mod_dir.so LoadModule env_module modules/mod_env.so LoadModule headers_module modules/mod_headers.so LoadModule include_module modules/mod_include.so LoadModule isapi_module modules/mod_isapi.so LoadModule log_config_module modules/mod_log_config.so LoadModule mime_module modules/mod_mime.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadFile modules/mod_proxy_html/zlib.dll LoadFile modules/mod_proxy_html/iconv.dll LoadFile modules/mod_proxy_html/libxml2.dll LoadModule proxy_html_module modules/mod_proxy_html/mod_proxy_html.so LoadModule xml2enc_module modules/mod_proxy_html/mod_xml2enc.so LoadModule setenvif_module modules/mod_setenvif.so <IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> User daemon Group daemon </IfModule> </IfModule> ProxyHTMLLinks a href ProxyHTMLLinks area href ProxyHTMLLinks link href ProxyHTMLLinks img src longdesc usemap ProxyHTMLLinks object classid codebase data usemap ProxyHTMLLinks q cite ProxyHTMLLinks blockquote cite ProxyHTMLLinks ins cite ProxyHTMLLinks del cite ProxyHTMLLinks form action ProxyHTMLLinks input src usemap ProxyHTMLLinks head profile ProxyHTMLLinks base href ProxyHTMLLinks script src for xml2EncDefault UTF-8 ServerAdmin [email protected] ServerName hqmktgwb01.mydomain.com:80 <Proxy balancer://dashstats/> BalancerMember http://127.0.0.1:3000 BalancerMember http://127.0.0.1:3001 BalancerMember http://127.0.0.1:3002 BalancerMember http://127.0.0.1:3003 ProxySet lbmethod=bybusyness </Proxy> ProxyRequests Off <Directory c:/www/nvdlstats/public> Order allow,deny Allow from all </Directory> ########################################################################################### NameVirtualHost *:80 <VirtualHost *:80> ServerName hqmktgwb01.nvidia.com ServerAlias hqmktgwb01 DocumentRoot "E:/htdocs" ProxyPass /dashstats/css ! ProxyPass /dashstats/js ! ProxyPass /dashstats/images ! ProxyPass /dashstats/ balancer://dashstats/ ProxyPassReverse /dashstats/ balancer://dashstats/ <Location /dashstats/> ProxyPassReverse / ProxyHTMLEnable On ProxyHTMLURLMap balancer://dashstats/ /dashstats/ ProxyHTMLURLMap / /dashstats/ </Location> RedirectMatch ^/dashstats$ /dashstats/ <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "E:/htdocs"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <IfModule alias_module> Alias /dashstats/css c:/www/nvdlstats/public/css Alias /dashstats/js c:/www/nvdlstats/public/js Alias /dashstats/images c:/www/nvdlstats/public/images ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/" </IfModule> <IfModule dir_module> DirectoryIndex index.html </IfModule> </VirtualHost> ########################################################################################### ########################################################################################### ########################################################################################### <VirtualHost *:80> ServerName dashstats.nvidia.com ServerAlias dashstats DocumentRoot "C:/www/nvdlstats/public" ProxyPass /css ! ProxyPass /js ! ProxyPass /images ! ProxyPass / balancer://dashstats/ ProxyPassReverse / balancer://dashstats/ </VirtualHost> ########################################################################################### <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> <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> DefaultType text/plain <IfModule mime_module> TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz </IfModule> LoadModule php5_module "c:/php/php5apache2_2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/php" <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> <IfModule headers_module> Header set X-UA-Compatible: IE=8 </IfModule>