【发布时间】:2013-05-11 22:21:33
【问题描述】:
我确实想在我的 ubuntu 12.04 上运行颠覆。事实上我已经安装了它(v.1.6)。 我还配置了 /etc/apache2/mods-available/dav_svn.conf 所以它看起来像这样:
<Location /svn>
DAV svn
SVNPath /repo/mml
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/subversion/passwd
Require valid-user
</Location>
我在提到的文件中添加了一个用户+密码,并做了 chown -R www-data:www-data /repo 。 现在,如果我尝试使用
在我的工作机器上浏览我的仓库http://myserver/svn
我得到“状态代码:404”,没有任何异常或 Stacktrace! 如果我尝试去
http://localhost/svn
在我正在获取的服务器上
"-bash: http://localhost/svn: No such file or directory".
我检查了 apache error.log 但没有错误。我的 accesss.log 是空的。
您知道我在配置中可能做错了什么吗? 你知道什么地方会出错吗?
编辑:
我想我弄清楚了问题所在。我为 jenkins 创建了一个配置文件,它将端口 80 上的传入请求路由到端口 8080 /etc/apache2/sites-available/jenkins。如果我删除此配置,我将无法再从我的工作机器访问 jenkins,因为http://my-ip:8080 超时。这是我的 VirtualHost 配置。
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName ci.company.com
ServerAlias ci
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost on
ProxyPass / http://localhost:8080/
</VirtualHost>
我找到了解决这个问题的方法。关键是使用带有前缀的jenkins。在 /etc/default/jenkins 的詹金斯 ARGS 中定义 --prefix=/jenkins。在此之后,您可以代理传递 /jenkins 请求,请参阅更新的配置:
<VirtualHost *>
ServerAdmin webmaster@localhost
ServerName ci.company.com
ServerAlias ci
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost on
ProxyPass /jenkins http://localhost:8080/jenkins
</VirtualHost>
【问题讨论】:
标签: svn ubuntu http-status-code-404