我全新安装了 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 实际上带我到 hudson
但是 mydomain/hudson 会导致 apache 错误,提示:
File does not exist: /etc/apache2/var
我究竟做错了什么?
谢谢!
答案1
您需要将 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