Changeset 1097

Show
Ignore:
Timestamp:
06/24/11 17:15:39 (11 months ago)
Author:
metrot
Message:

Ajout du service SVN pour CentOS
Configuration de reverse proxy web pour SVN sous CentOS

Location:
trunk/lib
Files:
1 added
5 modified
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/lib/middleware/config_http_reverse_proxy.sh

    r1096 r1097  
    1111placomgr put vh4reverse_proxy {apache_vh_conf_file} $* 
    1212placomgr put vh_spip4reverse_proxy {apache_spip_conf_file} $* 
    13 #placomgr put vh_svn4reverse_proxy {apache_svn_conf_file} $* 
     13placomgr put vh_svn4reverse_proxy {apache_svn_conf_file} $* 
    1414#placomgr put vh_sympa4reverse_proxy {apache_sympa_conf_file} $* 
    1515placomgr put vh_horde4reverse_proxy {apache_horde_conf_file} $* 
  • trunk/lib/template/config_svn_repositories.ex

    r1094 r1097  
    1010    $OUT .= "then \n"; 
    1111    $OUT .= "svnadmin create --fs-type fsfs $dir_repo/$r \n"; 
    12     $OUT .= "chown -R www-data:www-data $dir_repo/$r \n"; 
     12    $OUT .= "chown -R $apache_uid:$apache_uid $dir_repo/$r \n"; 
    1313    $OUT .= "chmod -R 700 $dir_repo/$r \n" ; 
    1414    $OUT .= "fi \n"; 
  • trunk/lib/template/vh4reverse_proxy

    r1096 r1097  
    6161    } 
    6262 
    63     #if ($v->{type} =~ /^svn$/i) { 
    64     writecommonssl($v,$vh,$vh,0,0,1) 
    65     #} 
     63    if ($v->{type} =~ /^svn$/i) { 
     64        $OUT.=writecommonssl($v,$vh,$vh,0,0,1) 
     65    } 
    6666  } 
    6767 
  • trunk/lib/template/vh4svn_server

    r1094 r1097  
    2424  LogLevel    Warn 
    2525 
    26   <Location /> 
     26  <Location /svn> 
    2727   DAV svn 
    2828   SVNParentPath {!$dir_repo!} 
     
    3333  { 
    3434    $OUT .= "# $r\n"; 
    35     $OUT .= "  <Location /$r>\n"; 
     35    $OUT .= "  <Location /svn/$r>\n"; 
    3636    $OUT .= "   AuthType Basic\n"; 
    3737    $OUT .= "   AuthName \"Svn repository : $r\"\n"; 
  • trunk/lib/template/vh_common4reverse_proxy.pm

    r1096 r1097  
    5959        $out.=sprintf("\t\tSetOutputFilter  INFLATE;proxy-html;DEFLATE\n"); 
    6060    } 
     61    if ($svn) { 
     62        $out.=sprintf("\t\t<Limit OPTIONS PROPFIND GET REPORT MKACTIVITY PROPPATCH PUT CHECKOUT MKCOL MOVE COPY DELETE LOCK UNLOCK MERGE>\n"); 
     63        $out.=sprintf("\t\t\tOrder Deny,Allow\n"); 
     64        $out.=sprintf("\t\t\tAllow from all\n"); 
     65        $out.=sprintf("\t\t\tSatisfy Any\n"); 
     66        $out.=sprintf("\t\t</Limit>\n"); 
     67    } 
    6168    $out.=sprintf("\t</Location>\n\n"); 
    6269     
  • trunk/lib/template/vh_svn4reverse_proxy

    r1094 r1097  
    88  $OUT=""; 
    99 
    10   sub writeconf 
    11   { 
    12     my($v,$vh,$https,$targetvh,$revproxy,$rewritehtml,$dav) = @_ ; 
    13  
    14     $OUT .= writecommonconf(@_) ; 
    15  
    16     if ($revproxy) 
    17     { 
    18       $OUT.=sprintf("  ProxyPass / http://%s/\n",$targetvh); 
    19       if ($rewritehtml) { $OUT.=sprintf("  ProxyHTMLURLMAP http://%s/ /\n",$targetvh); } 
    20       if ($dav) 
    21       { 
    22         $OUT.=sprintf("  <Location /dav>\n"); 
    23         $OUT.=sprintf("    RequestHeader edit Destination ^https://%s/(.*)\$ http://%s/\$1\n",$v->{external_server_name},$targetvh); 
    24         $OUT.=sprintf("  </Location>\n"); 
    25       } 
    26       $OUT.=sprintf("  <Location />\n"); 
    27       $OUT.=sprintf("    ProxyPassReverse http://%s/\n",$targetvh); 
    28  
    29       $OUT.="    <Limit OPTIONS PROPFIND GET REPORT MKACTIVITY PROPPATCH PUT CHECKOUT MKCOL MOVE COPY DELETE LOCK UNLOCK MERGE>\n"; 
    30       $OUT.="      Order Deny,Allow\n"; 
    31       $OUT.="      Allow from all\n"; 
    32       $OUT.="      Satisfy Any\n"; 
    33       $OUT.="    </Limit>\n"; 
    34  
    35       if ($rewritehtml) { $OUT.=sprintf("    SetOutputFilter  INFLATE;proxy-html;DEFLATE\n"); } 
    36       $OUT.=sprintf("  </Location>\n"); 
    37     } 
    38     $OUT.="</VirtualHost>\n"; 
    39     $OUT.="</IfModule>\n" if $https ; 
    40   } 
    41  
    4210  while (($k,$v)=each %vh) 
    4311  { 
     
    4513    next unless $v->{type} =~ /^svn$/i ; 
    4614 
    47     # HTTPS vh definition 
    48     # writeconf($v,$vh,$https,$targetvh,$revproxy,$rewritehtml,$dav) 
    49     writeconf($v,$vh,1,$vh,1,0,0) ; 
     15     # HTTP vh definition 
     16    # writeconf($v,$vh,$targetvh,$revproxy,$rewritehtml,$dav) 
     17    $OUT.=writecommontop($v,$vh,$vh,0,0,0) ; 
     18    $OUT.=sprintf("\tRewriteRule ^/(.*)${dollar} https://%s/%s/${dollar}1\n" ,$external_hostname,$vh); 
     19    $OUT.=writecommonbottom($v,$vh,$vh,0,0,0); 
    5020  } 
    5121!}