Hoping someone has experience deploying django or an app like it in Apache (someone with experience deploying a Java website <might> be able to provide some insight although django is a python app)
Setup:
Installed
openSUSE 13.1/LXDE
Apache 2.4
mod_wsgi (from the OSS)
Configuration:
Added the following line to the top of /etc/apache2/httpd.conf
Created an /etc/apache2/httpd.conf.local which should contain custom commands modifying httpd.conf
Added the following line to /etc/apache2/httpd.conf.local
The contents of graphite.wsgi, should be pretty typical... It should import settings from various configs to build and point apache to the django app which is in a different location than the default web root.
Problem:
Apache is ignoring the django settings exposed by wsgi and continues to point to the default web root (/srv/www/htdocs)
Question:
Is there something <specific> (hopefully) I can look at that is supposed to re-direct the web root? From what I understand, Apache is supposed to come installed with default settings and only if no additional settings are imported then the default settings are used. I should not need to modify the default settings to disable them.
Maybe I should be doing something in a vhosts config somewhere although I'm deploying just this one instance?
TIA,
TSU
Setup:
Installed
openSUSE 13.1/LXDE
Apache 2.4
mod_wsgi (from the OSS)
Configuration:
Added the following line to the top of /etc/apache2/httpd.conf
Code:
LoadModule wsgi_module /usr/lib64/apache2/mod_wsgi.so
Added the following line to /etc/apache2/httpd.conf.local
Code:
WSGIScriptAlias / /opt/graphite/conf/graphite.wsgi
Code:
# cat /opt/graphite/conf/graphite.wsgi
import os, sys
sys.path.append('/opt/graphite/webapp')
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
# READ THIS
# Initializing the search index can be very expensive, please include
# the WSGIScriptImport directive pointing to this script in your vhost
# config to ensure the index is preloaded before any requests are handed
# to the process.
from graphite.logger import log
log.info("graphite.wsgi - pid %d - reloading search index" % os.getpid())
import graphite.metrics.search
Apache is ignoring the django settings exposed by wsgi and continues to point to the default web root (/srv/www/htdocs)
Question:
Is there something <specific> (hopefully) I can look at that is supposed to re-direct the web root? From what I understand, Apache is supposed to come installed with default settings and only if no additional settings are imported then the default settings are used. I should not need to modify the default settings to disable them.
Maybe I should be doing something in a vhosts config somewhere although I'm deploying just this one instance?
TIA,
TSU