2012-05-14 52 views
0

我在我的nginx web服务器上构建了svn服务器。我的nginx的配置是使用nginx的svn提交失败:找不到路径

 
server { 
     listen 80; 
     server_name svn.mysite.com; 
     location/{ 
     access_log off; 
     proxy_pass http://svn.mysite.com:81; 
     proxy_set_header X-Real-IP $remote_addr; 
     proxy_set_header Host $host; 
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
     } 
     location ~ \.php$ { 
       fastcgi_pass 127.0.0.1:9000; 
       fastcgi_index index.php; 
       include fastcgi_params; 
     } 
} 

现在,我可以SVN共同svn的最高正常,而无需任何问题 ,当我尝试提交我得到错误:

 
$svn up 
At revision 1285. 
$ svn info 
Path: . 
URL: http://svn.mysite.com/elpis-repo/crons 
Repository Root: http://svn.mysite.com/elpis-repo 
Repository UUID: 5303c0ba-bda0-4e3c-91d8-7dab350363a1 
Revision: 1285 
Node Kind: directory 
Schedule: normal 
Last Changed Author: alaa 
Last Changed Rev: 1280 
Last Changed Date: 2012-04-29 10:18:34 +0300 (Sun, 29 Apr 2012) 

$svn st 
M  config.php 
$svn ci -m "Just a test, add blank line to config" config.php 
Sending  config.php 
svn: Commit failed (details follow): 
svn: File 'config.php' is out of date 
svn: '/elpis-repo/!svn/bc/1285/crons/config.php' path not found 

,如果我尝试svn合作港口81(我的proxy_pass这是apache),然后svn ci,它会工作顺利! 但为什么当我使用nginx来完成它时不工作?
任何想法是高度赞赏。

+0

什么' svn info'说当从config.php所在的目录运行时? –

+0

@malenkiy_scot:问题已编辑,我已添加svn信息 – Alaa

回答

0

https://serverfault.com/questions/388835/svn-using-nginx-commit-failed-path-not-found/389021#answer-389021'>QUOTED FROM服务器故障
该请求被抓通过您的.php $位置块,并通过FastCGI传递给PHP。您需要确保SVN请求始终代理Apache。如果您不需要此虚拟主机上的PHP,只需删除该位置指令。如果您需要特定路径下的PHP,请使位置块更具体,例如^/phpstuff /.*。php $。如果这是不可能的,PHP一个前添加一个空位置块捕捉.PHP将svn的路径下的文件,如:

 
location ~ ^/elpis-repo/.*\.php$ {} 


参考: https://serverfault.com/questions/388835/svn-using-nginx-commit-failed-path-not-found/389021#answer-389021

相关问题