move apache config to a template

This commit is contained in:
Jesse Andrews 2011-09-11 17:53:34 -07:00
parent 1b17570c4c
commit 8b564a8fb9
3 changed files with 32 additions and 28 deletions

View file

@ -34,8 +34,8 @@ echo "127.0.0.1 localhost $NAME" > $DEST/etc/hosts
# copy kernel modules # copy kernel modules
cp -pr /lib/modules/`uname -r` $DEST/lib/modules cp -pr /lib/modules/`uname -r` $DEST/lib/modules
# helpful screenrc # inject stack.sh files
cp files/screenrc $DEST/root/.screenrc cp -r files $DEST/opt/files
# copy openstack installer and requirement lists to a new directory. # copy openstack installer and requirement lists to a new directory.
mkdir -p $DEST/opt mkdir -p $DEST/opt

View file

@ -0,0 +1,25 @@
<VirtualHost *:80>
WSGIScriptAlias / %DASH_DIR%/openstack-dashboard/dashboard/wsgi/django.wsgi
WSGIDaemonProcess dashboard user=www-data group=www-data processes=3 threads=10
WSGIProcessGroup dashboard
DocumentRoot %DASH_DIR%/.blackhole/
Alias /media %DASH_DIR%/openstack-dashboard/media
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory %DASH_DIR%/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>

View file

@ -97,32 +97,8 @@ if [ "$CMD" == "install" ]; then
# setup apache # setup apache
mkdir $DASH_DIR/.blackhole mkdir $DASH_DIR/.blackhole
cat > /etc/apache2/sites-enabled/000-default <<EOF # FIXME(ja): can't figure out how to make $DASH_DIR work in sed, also install to available/a2e it
<VirtualHost *:80> cat $DIR/files/000-default.template | sed "s/%DASH_DIR%/\/opt\/dash/g" > /etc/apache2/sites-enabled/000-default
WSGIScriptAlias / $DASH_DIR/openstack-dashboard/dashboard/wsgi/django.wsgi
WSGIDaemonProcess dashboard user=www-data group=www-data processes=3 threads=10
WSGIProcessGroup dashboard
DocumentRoot $DASH_DIR/.blackhole/
Alias /media $DASH_DIR/openstack-dashboard/media
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory $DASH_DIR/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
EOF
chown -R www-data:www-data $DASH_DIR chown -R www-data:www-data $DASH_DIR
@ -134,6 +110,9 @@ EOF
mkdir -p $DEST/images mkdir -p $DEST/images
tar -C $DEST/images -zxf $DEST/tty.tgz tar -C $DEST/images -zxf $DEST/tty.tgz
# add useful screenrc
cp $DIR/files/screenrc ~/.screenrc
exit exit
fi fi