English 中文(简体)
A. 虚拟 寄至Mecurial cgi书
原标题:Apache VirtualHost subdomain forwarding to Mercurial cgi script

我需要通过一个阿帕奇虚拟Host子公司和授权,对我的美术服务器单进行跟踪。

My apache is running on 80 and 91. Apache is serving Mercurial through

C:wampinapacheApache2.2.21cgi-binhgweb.cgi and is accessable through

http://my.com/cgi-bin/hgweb.cgi and http://localhost/cgi-bin/hgweb.cgi

这一切都很好,非常好。 我的目标是把它归为:

http://hg.my.com/“rel=“nofollow”http://hg.my.com/

没有拖车 c子/bin网。

下面,我有幸与以下会议合作:

http://hg.my.com/cgi-bin/hgweb.cgi

......但是,它没有适当获取图像和图像(类似于完美服务)。

我迄今所困惑:

ScriptAlias /hg "/cgi-bin/hgweb.cgi"
<VirtualHost *:80>
ServerName hg.my.com
ServerAlias hg.my.com

#ScriptAlias / "/cgi-bin/hgweb.cgi"
#  <Directory />
#   Order Deny,Allow
#   Allow from all
#  </Directory>

#        ProxyPass /stylesheets !
#        ProxyPass /javascripts !
#        ProxyPass /images !

ProxyPassMatch ^.*/static(/.*.css)$ http://localhost:91/cgi-bin/hgweb.cgi/static/$1
ProxyPassMatch ^.*/static(/.*.js)$ http://localhost:91/cgi-bin/hgweb.cgi/static/$1
ProxyPassMatch ^.*/static(/.*.png)$ http://localhost:91/cgi-bin/hgweb.cgi/static/$1
ProxyPassMatch ^.*/static(/.*.gif)$ http://localhost:91/cgi-bin/hgweb.cgi/static/$1

ProxyPreserveHost On
ProxyPass / http://localhost:91/cgi-bin/hgweb.cgi
ProxyPassReverse / http://localhost:91/cgi-bin/hgweb.cgi
<Proxy *>
  #DirectoryIndex hgweb.cgi
    #ScriptAlias / /hgweb.cgi
# #  Order Allow,Deny
# #  Allow from all
    Order Deny,Allow
    Allow from 127.0.0.1
    AuthUserFile C:wamp.htpasswd
    AuthName "Please Log In"
    AuthType Basic

    require user admin
    require user dev

 </Proxy>
</VirtualHost>

Obviously I am using the time honored google-trial-and-error approach and am out of my depth here.

因此,我原想力无能为力地阻止自力更生,否则,这种自力更生似乎很好地服务,现在就已经耗尽,充满了对手头问题的敌意。

"Brother, can you spare a dime?"

问题回答

为什么在80和91方面都出现ache? 难道有91条只是用于静态内容? 除非我没有你的要求,否则你就能够做你所需要的事情:

<VirtualHost *:80>
ServerName hg.my.com

ScriptAlias / "/cgi-bin/hgweb.cgi"

<Location />
    Order Deny,Allow
    AuthUserFile C:wamp.htpasswd
    AuthName "Please Log In"
    AuthType Basic

    require user admin
    require user dev

</Location>
</VirtualHost>

您不需要代理,或需要单独的静态规则(Mercurial将为他们提供公正的罚款)。

Just put a slash after the script: ScriptAlias /hg "/cgi-bin/hgweb.cgi/"





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签