Changeset 883


Ignore:
Timestamp:
Aug 12, 2008, 4:02:57 PM (16 years ago)
Author:
y_z
Message:

converted two of the generated config files to use mako

Location:
trunk/packages/sipb-xen-www
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/debian/control

    r768 r883  
    33Priority: extra
    44Maintainer: SIPB Xen Project <sipb-xen@mit.edu>
    5 Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.1.0), subversion
     5Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.1.0), subversion, sipb-xen-base
    66Standards-Version: 3.7.2
    77
  • trunk/packages/sipb-xen-www/debian/sipb-xen-www.init

    r881 r883  
    1616gen_config()
    1717{
    18     local errormail="$( invirt-getconf web.errormail )" \
    19           hostname="$( invirt-getconf web.hostname )" \
    20           tracuri="$( invirt-getconf trac.uri )" \
    21           svnpath="$( invirt-getconf svn.repopath )"
    22 
    23     cat > /etc/apache2/sites-available/ssl << EOF
    24 <VirtualHost *:443>
    25         ServerAdmin $hostname
    26         ServerName $trachost:443
    27        
    28         DocumentRoot /var/www/sipb-xen-www
    29         <Directory /var/www/sipb-xen-www>
    30                 Options Indexes FollowSymLinks MultiViews ExecCGI
    31                 AllowOverride None
    32                 Order allow,deny
    33                 allow from all
    34         </Directory>
    35         <Location />
    36                 Require valid-user
    37                 AuthType SSLCert
    38                 AuthSSLCertVar SSL_CLIENT_S_DN_Email
    39                 AuthSSLCertStripSuffix "@MIT.EDU"
    40         </Location>
    41 
    42         RewriteEngine On
    43         RewriteRule ^/favicon.ico - [L]
    44         RewriteRule ^/static(.*) - [L]
    45         RewriteRule ^/overlord/static(.*) /static/\$1 [L]
    46         RewriteRule ^/admin/static(.*) /static/\$1 [L]
    47         RewriteRule ^/trac.fcgi(.*) - [L]
    48         RewriteRule ^/trac/chrome/common(.*) /usr/share/trac/htdocs\$1 [L]
    49         RewriteRule ^/trac(.*) /var/www/trac/trac.fcgi\$1 [L]
    50         RewriteRule ^/var(.*) - [L]
    51         RewriteRule ^/wiki(.*) - [L]
    52         RewriteRule ^/kill.cgi - [L]
    53         RewriteRule ^/~ - [L]
    54         RewriteRule ^/(.*) /var/www/sipb-xen-www/main.fcgi/\$1 [L]
    55 
    56         RewriteLog /var/log/apache2/rewrite.log
    57         RewriteLogLevel 0
    58 
    59         ErrorLog /var/log/apache2/error.log
    60 
    61         # Possible values include: debug, info, notice, warn, error, crit,
    62         # alert, emerg.
    63         LogLevel warn
    64 
    65         CustomLog /var/log/apache2/ssl_access.log combined
    66         ServerSignature On
    67 
    68         SSLEngine on
    69 
    70         SSLCertificateFile ssl/server.crt
    71         SSLCertificateKeyFile ssl/server.key
    72        
    73         SSLCACertificateFile ssl/mitCAclient.pem
    74         SSLVerifyClient require
    75         SSLVerifyDepth 10
    76 
    77         SSLOptions +StdEnvVars
    78        
    79         SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
    80 
    81 
    82         Redirect /wiki $tracuri
    83 </VirtualHost>
    84 
    85 <VirtualHost *:446>
    86         ServerAdmin $errormail
    87         ServerName $hostname:446
    88        
    89         DocumentRoot /var/www/sipb-xen-www
    90         <Directory />
    91                 Options Indexes FollowSymLinks MultiViews ExecCGI
    92                 AllowOverride None
    93                 Order allow,deny
    94                 allow from all
    95         </Directory>
    96 
    97         ErrorLog /var/log/apache2/error.log
    98 
    99         # Possible values include: debug, info, notice, warn, error, crit,
    100         # alert, emerg.
    101         LogLevel warn
    102 
    103         CustomLog /var/log/apache2/ssl_nocert_access.log combined
    104         ServerSignature On
    105 
    106         SSLEngine on
    107 
    108         SSLCertificateFile ssl/server.crt
    109         SSLCertificateKeyFile ssl/server.key
    110        
    111         SSLVerifyClient none
    112 
    113         SSLOptions +StdEnvVars
    114        
    115         SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0       
    116 </VirtualHost>
    117 EOF
    118 
    119     cat > /etc/apache2/sites-available/svn << EOF
    120 <VirtualHost *:1111>
    121         ServerAdmin $errormail
    122         ServerName $hostname:1111
    123        
    124         <Directory />
    125                 Options FollowSymLinks
    126                 AllowOverride None
    127         </Directory>
    128         <Location />
    129                 DAV svn
    130                 SVNPath $svnpath
    131                 AuthType Basic
    132                 AuthName "xvm.mit.edu subversion repository"
    133                 AuthUserFile /etc/apache2/dav_svn.passwd
    134                 <LimitExcept GET PROPFIND OPTIONS REPORT>
    135                         Require valid-user
    136                 </LimitExcept>
    137         </Location>
    138 
    139         ErrorLog /var/log/apache2/error.log
    140 
    141         # Possible values include: debug, info, notice, warn, error, crit,
    142         # alert, emerg.
    143         LogLevel warn
    144 
    145         CustomLog /var/log/apache2/svn_access.log combined
    146         ServerSignature On
    147 
    148         SSLEngine on
    149 
    150         SSLCertificateFile ssl/server.crt
    151         SSLCertificateKeyFile ssl/server.key
    152 </VirtualHost>
    153 EOF
     18    mako /etc/apache2/sites-available/{ssl,svn}.mako
    15419}
    15520
Note: See TracChangeset for help on using the changeset viewer.