On Mon, Dec 17, 2012 at 5:41 AM, kenneth massada <[email protected]> wrote: > cat <<EOF > /etc/httpd/conf.d/cobbler_web.conf > <VirtualHost *:80> > ServerName cobbler.my_domain.com > ServerAlias cobbler > SetEnvIf Request_URI ".*/op/events/user/.*" dontlog > CustomLog logs/access_log combined env=!dontlog > <Location "/cobbler_web"> > SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE settings > # PythonOption django.root /cobbler_web > PythonDebug On > PythonPath "['/usr/share/cobbler/web/'] + sys.path" > AuthBasicAuthoritative Off > AuthType basic > AuthName "Cobbler" > Require valid-user > PythonAuthenHandler cobbler_web.views > </Location> > </VirtualHost> > EOF > > > that too gives me an error > MOD_PYTHON ERROR > > ProcessId: 2984 > Interpreter: 'cobbler.my_domain.com' > > ServerName: 'cobbler.my_domain.com' > DocumentRoot: '/var/www/html' > > URI: '/cobbler_web' > Location: '/cobbler_web' > Directory: None > Filename: '/var/www/html/cobbler_web' > PathInfo: '' > > Phase: 'PythonAuthenHandler' > Handler: 'cobbler_web.views' > > Traceback (most recent call last): > > File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line > 1537, in HandlerDispatch > default=default_handler, arg=req, silent=hlist.silent) > > File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line > 1202, in _process_target > module = import_module(module_name, path=path) > > File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line > 304, in import_module > return __import__(module_name, {}, {}, ['*']) > > File "/usr/share/cobbler/web/cobbler_web/views.py", line 6, in <module> > from django.shortcuts import render_to_response > > File "/usr/lib/python2.6/site-packages/django/shortcuts/__init__.py", line > 10, in <module> > from django.db.models.manager import Manager > > File "/usr/lib/python2.6/site-packages/django/db/__init__.py", line 14, in > <module> > if not settings.DATABASES: > > File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line > 276, in __getattr__ > self._setup() > > File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 40, > in _setup > raise ImportError("Settings cannot be imported, because environment > variable %s is undefined." % ENVIRONMENT_VARIABLE) > > ImportError: Settings cannot be imported, because environment variable > DJANGO_SETTINGS_MODULE is undefined. > > I have got it to run before, but not sure what i'm not doing right this > time. any help will be much appreciated.
Two things I see that might be the issue: 1) Cobbler (as of 2.2.3) redirects traffic to 443, so you need a vhost on that port as well (you can edit the rewrite rules if you want to avoid that instead). 2) I've run into issues in the past where mod_python and mod_wsgi are both enabled, so you might want to remove mod_python if possible. _______________________________________________ cobbler mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/cobbler
