颠覆国家代码404
我想在我的Ubuntu 12.04上运行颠覆。实际上我已经安装了它(v.1.6)。 我还配置了到/etc/apache2/mods-available/dav_svn.conf所以它看起来像这样:颠覆国家代码404
<Location /svn>
DAV svn
SVNPath /repo/mml
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/subversion/passwd
Require valid-user
</Location>
我添加了一个用户+密码所提到的文件并做CHOWN -R www数据:www-data/repo。 现在,如果我尝试浏览到我的回购我的工作机上使用
http://myserver/svn
即时得到“状态码:404”没有任何异常或堆栈跟踪! 如果我尝试去
http://localhost/svn
在服务器上即时得到
"-bash: http://localhost/svn: No such file or directory".
我已经检查了Apache的error.log,但没有错误。我的acces.log是空的。
你有什么想法,我可能在我的配置中做错了吗? 你知道会出现什么问题吗?
编辑: 我想我找出了问题所在。我为jenkins创建了一个配置文件,它将端口80上的发送请求路由到端口8080 /etc/apache2/sites-available/jenkins
。如果我删除这个配置,我不能从我的工作机器访问jenkins了,因为http://my-ip:8080
超时。这是我的VirtualHost配置。
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName ci.company.com
ServerAlias ci
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost on
ProxyPass/http://localhost:8080/
</VirtualHost>
我找到了解决这个问题的方法。关键是要使用带前缀的jenkins。在jenkins ARGS中定义--prefix=/jenkins
/etc/default/jenkins
。在此之后,您可以代理通过/ jenkins请求,请参阅更新的配置:
<VirtualHost *>
ServerAdmin [email protected]
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>
我找到了一个解决这个问题。关键是要使用带前缀的jenkins。在jenkins ARGS中定义--prefix=/jenkins
/etc/default/jenkins
。在此之后,您可以代理通过/詹金斯请求,看到更新的配置:
<VirtualHost *>
ServerAdmin [email protected]
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>
404 HTTP状态为“未找到”。在Subversion中,它可能是相关的。有些页面表示权限问题也可能是一个可能的原因。
你做过chmod -R 770 /repo/mml/*
吗?
是的,我已经尝试过,没有任何成功。也许有趣的是需要注意的是,当访问回购时,我会弹出一个验证码。在404验证之后出现。我是否需要在我的回购项目中有一个项目才能浏览它,或者我可以创建一个回购项目,通过工作连接到项目并提交一个初始项目?也许这就是原因?我还读了一些关于WebSVn的内容,但我仍然不确定,无论我需要与否。 – jig 2013-05-08 15:24:31
''最后是否有/ mml?也许只是/回购会更好。 –
2013-05-09 01:48:02
SVNPath是我的知识库的直接路径。 SVNParentPath对于/ repo是正确的。至少在正确理解文件中的注释的情况下:“#SVNPath/var/lib/svn #或者,如果在单个目录下有多个存储库(在 以下),则使用SVNParentPath(/ var/lib/svn/repo1,/ var/lib/svn/repo2,...)。 #你需要SVNPath和SVNParentPath,但不能同时使用。 #SVNParentPath/var/lib/svn “ – jig 2013-05-09 10:46:21