3 # Provides: sipb-xen-remctl-auto
4 # Required-Start: $local_fs $remote_fs
5 # Required-Stop: $local_fs $remote_fs
6 # Default-Start: 2 3 4 5
8 # Short-Description: conserver config from invirt config for invirt host
12 PACKAGE=sipb-xen-remctl-auto
14 . /lib/lsb/init-functions
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 )"
23 cat > /etc/apache2/sites-available/ssl << EOF
26 ServerName $trachost:443
28 DocumentRoot /var/www/sipb-xen-www
29 <Directory /var/www/sipb-xen-www>
30 Options Indexes FollowSymLinks MultiViews ExecCGI
38 AuthSSLCertVar SSL_CLIENT_S_DN_Email
39 AuthSSLCertStripSuffix "@MIT.EDU"
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]
54 RewriteRule ^/(.*) /var/www/sipb-xen-www/main.fcgi/\$1 [L]
56 RewriteLog /var/log/apache2/rewrite.log
59 ErrorLog /var/log/apache2/error.log
61 # Possible values include: debug, info, notice, warn, error, crit,
65 CustomLog /var/log/apache2/ssl_access.log combined
70 SSLCertificateFile ssl/server.crt
71 SSLCertificateKeyFile ssl/server.key
73 SSLCACertificateFile ssl/mitCAclient.pem
74 SSLVerifyClient require
77 SSLOptions +StdEnvVars
79 SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
82 Redirect /wiki $tracuri
86 ServerAdmin $errormail
87 ServerName $hostname:446
89 DocumentRoot /var/www/sipb-xen-www
91 Options Indexes FollowSymLinks MultiViews ExecCGI
97 ErrorLog /var/log/apache2/error.log
99 # Possible values include: debug, info, notice, warn, error, crit,
103 CustomLog /var/log/apache2/ssl_nocert_access.log combined
108 SSLCertificateFile ssl/server.crt
109 SSLCertificateKeyFile ssl/server.key
113 SSLOptions +StdEnvVars
115 SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
119 cat > /etc/apache2/sites-available/svn << EOF
121 ServerAdmin $errormail
122 ServerName $hostname:1111
125 Options FollowSymLinks
132 AuthName "xvm.mit.edu subversion repository"
133 AuthUserFile /etc/apache2/dav_svn.passwd
134 <LimitExcept GET PROPFIND OPTIONS REPORT>
139 ErrorLog /var/log/apache2/error.log
141 # Possible values include: debug, info, notice, warn, error, crit,
145 CustomLog /var/log/apache2/svn_access.log combined
150 SSLCertificateFile ssl/server.crt
151 SSLCertificateKeyFile ssl/server.key
157 start|reload|force-reload|restart)
158 log_begin_msg "Reloading config for $PACKAGE"
165 log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"