Apache-2.2

Hudson 安裝代理失敗

  • July 12, 2012

我有一個全新的 Hudson 安裝,預設目錄等等。我一直在關注本指南

我已經按照它所說的,直到實際的 000-default 修改。我有點卡在這部分。

這是我的 000-default 文件:

<VirtualHost *:80>
   DocumentRoot /var/www
   ServerName name
   ServerAlias name
   <Directory />
           Options FollowSymLinks
           AllowOverride None
   </Directory>
   <Directory /var/www/>
           Options Indexes FollowSymLinks MultiViews
           AllowOverride None
           Order allow,deny
           allow from all
   </Directory>

   ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
   <Directory "/usr/lib/cgi-bin">
           AllowOverride None
           Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
           Order allow,deny
           Allow from all
   </Directory>

   Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
   Options Indexes MultiViews FollowSymLinks
   AllowOverride None
   Order deny,allow
   Deny from all
   Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

ProxyPass /var/lib/hudson/  http://mydomain:8080/hudson/
ProxyPassReverse /var/lib/hudson/ http://mydomain:8080/hudson/
</VirtualHost>

我的 proxy.conf 看起來像:

<Proxy *>
   Order deny,allow
   Allow from all
   Allow from [mynetwork]
</Proxy>

正如指南所說,我想通過導航到 mydomain/hudson 來訪問 hudson

而不是 mydomain:8080/

到目前為止,我已經對其進行了更改,以便 mydomain:8080/ 導致 404,

mydomain:8080/hudson 實際上帶我去哈德遜

但是 mydomain/hudson 會導致 apache 錯誤,上面寫著:

File does not exist: /etc/apache2/var

我究竟做錯了什麼?

謝謝!

您需要將 ProxyPass 和 ProxyPassReverse 行更改為:

ProxyPass /hudson/  http://mydomain:8080/hudson/
ProxyPassReverse /hudson/ http://mydomain:8080/hudson/

這是 Apache 文件:

http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass

引用自:https://serverfault.com/questions/407112