Closed Dwijad closed 7 years ago
I am attaching more information as it looks mod_wsgi is compiled against python3 and apache2 is using python3 module ( apt-get install libapache2-mod-wsgi-py3 ).
root@demohost:~# cat /etc/apache2/mods-available/wsgi.load LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
root@demohost:~# ldd /usr/lib/apache2/modules/mod_wsgi.so linux-vdso.so.1 => (0x00007ffe7f9ea000) libpython3.5m.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.5m.so.1.0 (0x00007f9f26c1a000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9f269fd000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9f26633000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f9f2640a000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9f261f0000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9f25feb000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f9f25de8000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9f25adf000) /lib64/ld-linux-x86-64.so.2 (0x0000563d3323d000) root@demohost:~#
Apache Logs (Debug mode)
[Thu Jan 26 07:07:09.156047 2017] [wsgi:info] [pid 4064] mod_wsgi (pid=4064): Initializing Python.
[Thu Jan 26 07:07:09.171233 2017] [wsgi:info] [pid 4064] mod_wsgi (pid=4064): Attach interpreter ''.
[Thu Jan 26 07:07:09.908074 2017] [ssl:debug] [pid 4004] ssl_engine_kernel.c(2023): [client 117.227.65.236:34900] AH02041: Protocol: TLSv1.2, Cipher: ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
[Thu Jan 26 07:07:09.908272 2017] [ssl:debug] [pid 4004] ssl_engine_kernel.c(354): [client 117.227.65.236:34900] AH02034: Initial (No.1) HTTPS request received for child 2 (server demohost.com:443)
[Thu Jan 26 07:07:09.908395 2017] [authz_core:debug] [pid 4004] mod_authz_core.c(809): [client 117.227.65.236:34900] AH01626: authorization result of Require all granted: granted
[Thu Jan 26 07:07:09.908440 2017] [authz_core:debug] [pid 4004] mod_authz_core.c(809): [client 117.227.65.236:34900] AH01626: authorization result of
Thanks
Hi Able to solve the problem by compiling mod_wsgi against python3.5 and then creating apache configuration for wsgi (wsgi.load). The steps are given below if someone wants to compile and install mod_wsgi in ubuntu 16.04 . Also i have removed apache module for python3 that i have installed earlier using apt-get.
root@demohost:~# apt-get purge libapache2-mod-wsgi-py3
root@demohost:~# wget https://github.com/GrahamDumpleton/mod_wsgi/archive/develop.zip
root@demohost:~# unzip develop.zip
root@demohost:~# cd mod_wsgi-develop
root@demohost:~/mod_wsgi-develop#./configure --with-python=/usr/bin/python3.5
root@demohost:~/mod_wsgi-develop# make
root@demohost:~/mod_wsgi-develop# make install
root@demohost:~/mod_wsgi-develop# cd /etc/apache2/mods-available
root@demohost:/etc/apache2/mods-available# vi wsgi.load
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
root@demohost:/etc/apache2/mods-available# cd /etc/apache2/mods-enabled
root@demohost:/etc/apache2/mods-enabled# ln -s ../mods-available/wsgi.load .
root@demohost:/etc/apache2/mods-enabled# service apache2 start
Hope it helps others. Thanks
Hi I am trying to install ratticDB in ubuntu 16. Installed python3 module for apache. The default-ssl.conf configuration looks like this-
But i get 500 internal server error. ( Target WSGI script '/opt/apps/RatticWeb/ratticweb/wsgi.py' cannot be loaded as Python module.)
Does python3 module for apache works with RatticDB ?
Thanks