On Monday, March 26, 2018 at 6:25:59 PM UTC-4, Graham Dumpleton wrote:
>
>
>
>
> If you are using 4.5.2, that is very old. The latest is 4.6.3. Sure you 
> didn't mean 4.6.2? 
>

Sorry, I was mistaken, it is currently running with 4.5.15 which is running 
fine. 

>
>
> Are you saying you copied over the complete Apache configuration from 2.2 
> and tried using it in 2.4, or just the mod_wsgi and VirtualHost 
> configuration? 
>  

I set up a working version of Apache 2.4 which currently serves a site (a 
working MediaWiki install) on a third IP. 2.4 was setup from scratch. I 
copied over the VirtualHost configuration and made the appropriate changes 
with regards to permissions, etc that changed with 2.4.
 

>
> Is your alternate Python 2.7 installation the only Python 2.7 installation 
> on the system? Is system Python still Python 2.6? 
>
> There is still the system installed Python 2.6.6 in /usr/bin/python. We 
have alt-installed Python 2.7.13 into /usr/local/bin. Python 2.7 is run 
from the default PATH environment. All pip-modules are installed into 
/usr/local/lib/python-2.7/site-packages. There is no mod_wsgi installed 
into the site-packages as the module is just installed into the apache 
module directory itself.


> Are you modifying sys.path in the WSGI script file so Python will know 
> where your project code is? 
>
> You have to excuse me as I didn't build the Django app. The main wsgi.py 
calls the site.settings file. In the settings.py the closest thing I could 
find is:

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


> Do you mean using: 
>
>     WSGIApplicationGroup %{GLOBAL} 
>
> It is preferable you use that regardless. 
>
The information in the virtual host settings is:

WSGIDaemonProcess projectname 
python-path=/opt/rh/httpd24/root/var/www/html/sitea/project_name
WSGIProcessGroup project_name
WSGIScriptAlias / 
/opt/rh/httpd24/root/var/www/html/sitea/project_name/wsgi.py 
application-group=%{GLOBAL}
 

>
> Can you ensure you have set: 
>
>     LogLevel info 
>
> in Apache configuration. 
>
> LogLevel is currently set to debug as I wanted to get as much info as 
possible.
 

> This will cause mod_wsgi to log more about process restarts, script 
> loading etc. I need to see the more detailed logging from the log file 
> around time the request was made. If you are using VirtualHost specific 
> log, also need to see any errors from main  

Apache error log at the same time. 
>
 
This is a disconnected system and I can't export the logs directly. 
Hopefully the info below is what you need:

[wsgi:info] [pid 27937:tid #] mod_wsgi (pid=27937): Attach interpreter ''.
[wsgi.info] [pid 27937:tid #] mod_wsgi (pid=27937): Adding 
'/opt/rh/httpd24/root/var/www/html/sitea' to path
[wsgi:debug] - Spawns 15 threads in daemon process ' project_name'
[wsgi:info] [pid 27937:tid #] [remote 192.168.1.100] mod_wsgi (pid 27937, 
process='project_name', application=''): Loading Python script file 
'/opt/rh/httpd24/root/var/www/html/sitea/project_name/wsgi.py'
[wsgi:error] [pid 27981] [client 192.168.1.100] Truncated or oversized 
response headers received from damon process 'project_name': 
/opt/rh/httpd24/root/var/www/html/sitea/project_name/wsgi.py, referrer 
https://site.com/

I have the apache / virtual host logs dumping to the same file.

The 2.4 install is using mod_wsgi 4.6.3 which is installed into modules 
directory in Apache 2.4. It was compiled directing to the 2.4 apxs and to 
the /usr/local/ install of Python 2.7. It is the version reflected in the 
Apache startup log line.

> Graham 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to