Permalink
Browse files

Specifying WSGI config so that errors go into vhost-specific log file

  • Loading branch information...
swaroopch committed Feb 15, 2011
1 parent a969718 commit bd6618681fbec5dde95e7846397257388acfb10d
Showing with 5 additions and 1 deletion.
  1. +4 −0 setup/apache_site_entry
  2. +1 −1 setup/install.bash
View
@@ -3,6 +3,10 @@
ServerAlias www.{SITE_NAME}
ServerAdmin {ADMIN_EMAIL}
+ # Because of these lines, errors will go into the vhost-specific ErrorLog file.
+ WSGIDaemonProcess {SITE_NAME} user={USER} group={USER} processes=2 threads=25
+ WSGIProcessGroup {SITE_NAME}
+
Alias /static {HOME}/web/{SITE_NAME}/public/static
<Directory {HOME}/web/{SITE_NAME}/public>
Order allow,deny
View
@@ -182,7 +182,7 @@ APACHE_SITE_CONFIG="/etc/apache2/sites-available/$SITE_NAME"
if [[ ! -f $APACHE_SITE_CONFIG ]]
then
cp apache_site_entry $SITE_NAME
- sed -i -e "s/{SITE_NAME}/$SITE_NAME/g" -e "s/{HOME}/$HOME_ESCAPED/g" -e "s/{APP_NAME}/$APP_NAME/g" -e "s/{ADMIN_EMAIL}/$ADMIN_EMAIL/g" $SITE_NAME || critical "Could not fill apache config file"
+ sed -i -e "s/{SITE_NAME}/$SITE_NAME/g" -e "s/{HOME}/$HOME_ESCAPED/g" -e "s/{APP_NAME}/$APP_NAME/g" -e "s/{ADMIN_EMAIL}/$ADMIN_EMAIL/g" -e "s/{USER}/$USER/g" $SITE_NAME || critical "Could not fill apache config file"
sudo cp $SITE_NAME $APACHE_SITE_CONFIG || critical "Could not copy apache config file to apache sites-available directory"
sudo /usr/sbin/apache2ctl configtest || critical "Apache config file check failed"
sudo a2ensite $SITE_NAME || critical "Could not enable $SITE_NAME site"

0 comments on commit bd66186

Please sign in to comment.