【问题标题】:subversion status code 404颠覆状态码 404
【发布时间】: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


    【解决方案1】:

    404 HTTP 状态为“未找到”。在 Subversion 中,这可能是相关的.. 一些页面表明权限问题也可能是一个可能的原因。

    你有chmod -R 770 /repo/mml/*吗?

    http://svn.haxx.se/users/archive-2006-09/0601.shtml

    【讨论】:

    • 是的,我已经尝试过了,但没有任何成功。也许有趣的是,我在访问 repo 时会弹出一个身份验证。 auth 后出现 404 的东西。我需要在我的仓库中有一个项目才能浏览它,还是我可以创建一个仓库,通过工作机器连接到它并提交一个初始项目?也许这就是原因?我也读过一些关于 WebSVn 的东西,但我仍然不确定是否需要它。
    • &lt;SNVPath&gt; 结尾应该有 /mml 吗?也许只是 /repo 会更好。
    • SVNPath 是我的存储库的直接路径。 SVNParentPath 对 /repo 是正确的。至少如果正确理解文件中的 cmets:“ #SVNPath /var/lib/svn # 或者,如果您在单个目录下 # 下有多个存储库 (/var/lib/svn/repo1, /var/lib),请使用 SVNParentPath /svn/repo2, ...). # 你需要 SVNPath 和 SVNParentPath,但不能同时使用。#SVNParentPath /var/lib/svn "
    【解决方案2】:

    我找到了解决这个问题的方法。关键是使用带有前缀的jenkins。在 /etc/default/jenkins 的 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>
    

    【讨论】:

      猜你喜欢
      • 2011-03-24
      • 2017-05-29
      • 1970-01-01
      • 1970-01-01
      • 2014-05-10
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 1970-01-01
      相关资源
      最近更新 更多