This problem has tortured me for days. I am using Apache, WSGI and django on my Raspberry Pi. Operating system is Raspbian.
Everything is okay except this error from apache.
[error] [client 127.0.0.1] Target WSGI script not found or unable to stat: /home/pi/EZ_Green/apache/ems_gateway_django.wsgi
My configuration file is like this, pretty straightforward
WSGIDaemonProcess ems.ezgreenbuildings.com processes=1 maximum-requests=100 threads=10
WSGIScriptAlias / /home/pi/EZ_Green/apache/ems_gateway_django.wsgi
The file path is the full path for sure. So the file exists. Then I thought the apache server process does not have the permission to access the file, so I changed the mode of wsgi file to 777. But it still reports the same error.
I have searched for a while, and tried several methods.
- move the wsgi file to another foler, say '/var/www', but it still cannot find it.
- try to reinstall apache, does not work.
- remove trailing slash
The strange thing is, apache is working fine if I remove the wsgi configuration file. And django itself is working fine if I run test server provided by django.
If anyone can help, I would be very glad. Thanks!