Sorry for being so dense, I know just enough about Apache to be dangerous
and our SysAdmin just quit.
I'm running RHEL6 with mod_wsgi and Apache 2.2 whith Python 2.6 -- all
default components.
there is no envvars or envars file anywhere on the system.
adding the following to /etc/profile (which others said would apply to
Apache) and rebooting did not make these visible to Apache
SQLANY12="/opt/sqlanywhere12"
export SQLANY12
PATH="$SQLANY12/bin32:${PATH:-}"
export PATH
LD_LIBRARY_PATH="$SQLANY12/lib32:${LD_LIBRARY_PATH:-}"
export LD_LIBRARY_PATH
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
------------------------------------------------------------
my /etc/httpd/conf.d/wsgi.conf has
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias /myapp /var/www/wsgi-scripts/myapp.wsgi
WSGIScriptAlias /wsgi /var/www/wsgi-scripts
WSGIPythonPath /var/www/djangodeploy
WSGIScriptReloading On
#WSGIReloadMechanism Process
WSGIDaemonProcess djangoapps processes=2 threads=15
python-path=/var/www/djangodeploy
WSGIProcessGroup djangoapps
LogLevel info
WSGISocketPrefix /var/run/wsgi
<Directory /var/www/wsgi-scripts>
Order allow,deny
Allow from all
</Directory>
#<Directory /var/www/djangodeploy>
#Order allow,deny
#Allow from all
#</Directory>
-----------------------------------------------------------------------------
on an older system running mod_python I have
<Location "/django/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mds30.settings
PythonOption django.root /var/www//django/mds30
PythonPath "['/var/www/django'] + sys.path"
PythonDebug On
PythonAutoReload On
</Location>
Now I really don't comprehend the difference between the Location and the
Directory directives, but can i put the equivalent of the "SetEnv ..."
statements in the wsgi.conf <Directory settings?
logging os.environ returns {'LANG': 'C', 'CONSOLETYPE': 'vt', 'TERM':
'linux', 'SHLVL': '3', 'runlevel': '5', 'UPSTART_EVENTS': 'runlevel',
'PREVLEVEL': 'N', 'LANGSH_SOURCED': '1', 'UPSTART_INSTANCE': '', 'PWD': '/',
'RUNLEVEL': '5', 'UPSTART_JOB': 'rc', 'PATH':
'/sbin:/usr/sbin:/bin:/usr/bin', 'HOME': '/var/www', '_': '/usr/sbin/httpd',
'previous': 'N'}
even after a brute force attempt in my wsgi script as follows:
os.environ['SQLANY12'] = '/opt/sqlanywhere12'
os.environ['PATH'] = '/opt/sqlanywhere12/bin32:'+os.environ['PATH']
os.environ['LD_LIBRARY_PATH'] =
'/opt/sqlanywhere12/lib32:'+os.environ['LD_LIBRARY_PATH']
I't apparent that I'm failing to set the environment variables when running
as Apache.
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/modwsgi/-/qLeOsHe3ES4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.