2013-05-08 87 views
0

我想在我的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> 

回答

0

我找到了一個解決這個問題。關鍵是要使用帶前綴的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> 
1

404 HTTP狀態爲「未找到」。在Subversion中,它可能是相關的。有些頁面表示權限問題也可能是一個可能的原因。

你做過chmod -R 770 /repo/mml/*嗎?

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

+0

是的,我已經嘗試過,沒有任何成功。也許有趣的是需要注意的是,當訪問回購時,我會彈出一個驗證碼。在404驗證之後出現。我是否需要在我的回購項目中有一個項目才能瀏覽它,或者我可以創建一個回購項目,通過工作連接到項目並提交一個初始項目?也許這就是原因?我還讀了一些關於WebSVn的內容,但我仍然不確定,無論我需要與否。 – jig 2013-05-08 15:24:31

+0

''最後是否有/ mml?也許只是/回購會更好。 – 2013-05-09 01:48:02

+0

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