3,876 reputation
2811
bio website blog.dscpl.com.au
location Sydney, Australia
age 48
visits member for 5 years, 2 months
seen 19 hours ago
The grumpy old man. Work with C/C++/Python. Deep into Apache module development and C extension module development for Python.

2d
comment Setup Apache + mod_wsgi: incorrect function
Why are you using such an ancient Apache version? It is unlikely there are downloadable binaries for mod_wsgi for Apache 2.0 around, so not sure where you sourced it from. Use binaries from lfd.uci.edu/~gohlke/pythonlibs and the Apache version referenced from there. Use 64 bits for everything is preferred, so uninstall and start over.
Aug
18
comment Apache periodically shutting down once per week
Possibly it is sending the wrong signal to Apache. It should not be using SIGINT, but from memory SIGHUP (restart) or SIGUSR1 (graceful restart).
Aug
15
answered Repeated EC2 Apache 500 error
Aug
15
answered Does mod-wsgi automatically spin up again when apache restarts?
Aug
6
comment Nginx + Apache mod_wsgi, troubles understanding how to configure servers
For a start, ServerName should be a hostname only and not include a port. As it is a name based VirtualHost, the proxy statement in nginx would then need to refer to it by its hostname and not 127.0.0.1. Only one it could work as 127.0.0.1 is if that was the default VirtualHost.
Jul
23
comment mod wsgi picks up wrong libpython2.7.so.1.0
LDFLAGS is setting options to be used at compile time linking to find it and know it exists. LD_RUN_PATH is embedding directories to be searched at run time for the shared library.
Jul
21
answered mod wsgi picks up wrong libpython2.7.so.1.0
Jul
5
comment Database connection to postgresql refused for flask app under mod_wsgi when started by systemd
FWIW, setting os.environ on each request from WSGI request environ argument is considered bad practice. SetEnv should not be used to set process wide environment variables in this way.
Jun
25
awarded  Yearling
Jun
14
comment Apache and mod_wsgi, worker process stuck to W state, request never dies. How to diagnose?
Are you using WSGIApplicationGroup %{GLOBAL}. There are various Python modules that will not work in sub processes and if they deadlock, will bring the process down. Anyway, you should hop on the mod_wsgi mailing list and monitor it, have some new monitoring tools that can help monitor issues like this that have been talking about recently.
Jun
9
comment Error starting mod_wsgi
I have updated README at github.com/GrahamDumpleton/mod_wsgi with information on non standard Apache installations and running as root.
Jun
9
comment Error starting mod_wsgi
At that point I would suggest that SELinux may be enabled on your system and is screwing things up. Try temporarily disabling any SELinux extensions and see if that helps. For details on how to do that see crypt.gen.nz/selinux/disable_selinux.html
Jun
9
comment Error starting mod_wsgi
If you intend it to be available on port 80 as would normally be used by public facing web sites, you have no choice but to start it as root. If starting as root, whether or not you have to override which httpd executable is used, you would have to specify the user and group. Can you at least try and work out from the httpd shell script on CentOS what the real Apache executable binary is as I will update documentation with details of that issue and how to start up as root.
Jun
9
comment Error starting mod_wsgi
The bigger problem is that on CentOS they appear to have replaced the original Apache executable with a shell script which does extra things which screws things up. You would need to find where the original Apache executable is and use the option --httpd-executable to specify the location of it.
Jun
9
comment Error starting mod_wsgi
If running as root, you would need to specify the --user and --group options and set them to whatever the Apache user is on the system, or some other user that you want your Python web application to run as. Normally a different approach would be used to get things setup if eventually intend running mod_wsgi express as root which I haven't described anywhere yet. This is where the mod_wsgi mailing list becomes a better place to discuss things.
Jun
9
answered Error starting mod_wsgi
May
31
answered Multiple python versions under apache+mod_wsgi
May
2
answered Tuning django based site deployed using apache wsgi for better performance
Mar
19
awarded  Good Answer
Mar
12
comment How to configure Apache with mod_wsgi so that error messages come from the application?
The default for WSGIErrorOverride is Off so you can simply remove it from the configuration.