国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
利用SVNListParentPath增加http瀏覽倉庫根目錄的功能
使用SVNParentPath的時(shí)候,直接訪問ParentPath的時(shí)候,總是得到以下錯(cuò)誤提示:
403 Forbidden
Forbidden
You don't have permission to access /svn/ on this server.
下面的辦法可以搞定它:
一、首先,Subversion1.3及以后版本支持SVNListParentPath ON,之前的版本只能使用PHP自己做。
二、Location 設(shè)置中最后要加上/,應(yīng)該是<Location /svn/>而不是<Location /svn>否則可能不能訪問。
三、通過“http://localhost/svn/” 來訪問倉庫列表,如果想讓“http://localhost/svn”也起作用的話,需要在</Location>的后面增加重定向的設(shè)置:RedirectMatch ^(/svn)$ $1/  ,當(dāng)然也可以采用RewriteEngine之類的辦法。
四、修改后的httpd.conf的對(duì)應(yīng)部分如下:
<Location /svn/>
    DAV svn
    SVNListParentPath on
    SVNParentPath e:/svn
#    SSLRequireSSL                 #指定該目錄只能通過SSL操作
#    SVNPathAuthz off
    AuthzSVNAccessFile e:/ca/access/file
   
    #try anonymous access first,resort to real
    #authentication if necessary.
    #Satisfy Any
    Require valid-user
   
    #how to authenticate a user
    AuthType Basic
    AuthName "服務(wù)器需要身份驗(yàn)證:"
#    AuthUserFile e:/ca/access/svn-auth-file
  AuthMySQLHost localhost
  AuthMySQLUser Bugfree
  AuthMySQLPassword mandarin
  AuthMySQLDB BugFree
  AuthMySQLUserTable BugUser
  AuthMySQLNameField UserName
  AuthMySQLPasswordField UserPassword
#  AuthMySQLMD5Passwords On
  AuthMySQLPwEncryption md5
 
</Location>
RedirectMatch ^(/svn)$ $1/
五、如果使用Subversion1.3以前的版本,或需要定制列表顯示的話,可以自己寫php腳本來控制倉庫列表的顯示,TotoiseSVN的幫助文件中有詳細(xì)描述:
<html>
<head>
<title>Subversion Repositories</title>
</head>
<body>
<h2>Subversion Repositories</h2>
<p>
<?php
    $svnparentpath = "C:/svn";
    $svnparenturl = "/svn";
    $dh = opendir( $svnparentpath );
    if( $dh ) {
        while( $dir = readdir( $dh ) ) {
            $svndir = $svnparentpath . "/" . $dir;
            $svndbdir = $svndir . "/db";
            $svnfstypefile = $svndbdir . "/fs-type";
            if( is_dir( $svndir ) && is_dir( $svndbdir ) ) {
                echo "<a href=\"" . $svnparenturl . "/" .
                        $dir . "\">" . $dir . "</a>\n";
                if( file_exists( $svnfstypefile ) ) {
                    $handle = fopen ("$svnfstypefile", "r");
                    $buffer = fgets($handle, 4096);
                    fclose( $handle );
                    $buffer = chop( $buffer );
                    if( strcmp( $buffer, "fsfs" )==0 ) {
                        echo " (FSFS) <br />\n";
                    } else {
                        echo " (BDB) <br />\n";
                    }
                } else {
                    echo " (BDB) <br />\n";
                }
            }
        }
        closedir( $dh );
    }
?>
</p>
</body>
</html>
Save the lines above to a file svn_index.php and store that file in your web root folder. Next you have to tell Apache to show that page instead of the error:
Uncomment (remove the '#' char) from the following line in your Apache config file:
#LoadModule rewrite_module modules/mod_rewrite.so
Add the following lines just below your <Location> block where you define your Subversion stuff:
    RewriteEngine on
    RewriteRule ^/svn$ /svn_index.php [PT]
    RewriteRule ^/svn/$ /svn_index.php [PT]
    RewriteRule ^/svn/index.html$ /svn_index.php [PT] 六、URL重寫的若干非mod_rewrite方法 原文出處:http://www.chinaunix.net 作者:HonestQiao  發(fā)表于:2005-09-23 23:40:16 1、Alias:重寫到本地路徑
可以使用Alias把一個(gè)指定的Url重寫到某一固定的本地路徑
Alias /test/ /home/www/test/
那么對(duì)http://..../test/ 將對(duì)應(yīng)了/home/www/test/
注意:Alias必須是一一對(duì)應(yīng)的,/test/將不對(duì)/test起作用。
2、AliasMatch:重寫到本地路徑
與Alias類似,但是可以使用正則表達(dá)式
AliasMatch ^/test(.*) /home/www/test$1
3、Redirect :重寫到網(wǎng)址
Redirect /test/ http://....../test2/
4、RedirectMatch :重寫到網(wǎng)址
與Redirect類似,但是可以使用正則表達(dá)式
Redirect /test(.*) http://....../test2$1
在不需要很復(fù)雜的URL重寫時(shí),完全可以使用以上的幾條指令來進(jìn)行。

本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/islq/archive/2006/04/17/666911.aspx
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
博客園 - Java, Python, Jython and .NET. - Subversion配置安裝教程(二)
我的SVN配置
Ubuntu18.04基于Apache搭建SVN服務(wù)器
Git詳解之八:Git與其他系統(tǒng)
CentOS/Fedora下SVN+Apache服務(wù)器配置
SVN命令大全
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服