diff --git a/INSTALL b/INSTALL index bc7085fa..4675c5d4 100644 --- a/INSTALL +++ b/INSTALL @@ -109,6 +109,21 @@ Adding third party projects $ sudo ln -fs $SRC/grappelli $SITE_PACKAGES/grappelli fi +################### +Configuring Apache + +1. Edit WSGI script + * /path/to/projects/FlightDeck/apache/config_local.wsgi + * replace /path/to/projects to real path + +2. Edit Apache config (Ubuntu way) + # copy config file + $ sudo cp /path/to/projects/FlightDeck/tools/apache-example.conf /etc/apache2/sites-available/flightdeck + # edit and change paths in /etc/apache2/sites-available + # enable site + $ sudo a2ensite flightdeck + $ sudo /etc/init.d/apache2 reload + # browse http://flightdeck.localhost ##################### diff --git a/apache/config_local-default.wsgi b/apache/config_local-default.wsgi index e69de29b..b6830962 100644 --- a/apache/config_local-default.wsgi +++ b/apache/config_local-default.wsgi @@ -0,0 +1,16 @@ +import os, sys + +apache_configuration= os.path.dirname(__file__) +project = os.path.dirname(apache_configuration) +workspace = os.path.dirname(project) +sys.path.append(workspace) + +sys.path.append('/path/to/projects/FlightDeck/flightdeckenv/lib/python2.6/site-packages/') +sys.path.append('/path/to/projects/FlightDeck/') +sys.path.append('/path/to/projects/FlightDeck/flightdeck/') + +os.environ['DJANGO_SETTINGS_MODULE'] = 'flightdeck.settings' +import django.core.handlers.wsgi +application = django.core.handlers.wsgi.WSGIHandler() + + diff --git a/tools/apache-example.conf b/tools/apache-example.conf new file mode 100644 index 00000000..e0ae365e --- /dev/null +++ b/tools/apache-example.conf @@ -0,0 +1,25 @@ + + ServerAdmin john@example.com + ServerName flightdeck.localhost + + + Order deny,allow + Allow from all + Options Indexes FollowSymLinks + + + + SetHandler default + + Alias /adminmedia /path/to/projects/FlightDeck/flightdeck/adminmedia + + LogLevel warn + ErrorLog /path/to/projects/FlightDeck/logs/apache_error.log + CustomLog /path/to/projects/FlightDeck/logs/apache_access.log combined + + WSGIDaemonProcess flightdeck.localhost user=www-data group=www-data threads=25 + WSGIProcessGroup flightdeck.localhost + + WSGIScriptAlias / /path/to/projects/FlightDeck/apache/config_local.wsgi + +