mod_wsgi crash apache2 at start

46 views
Skip to first unread message

Android Berg

unread,
Mar 3, 2025, 3:14:52 PMMar 3
to modwsgi
Hi,
I compiled the latest veresion (5.0.2) and it went well. But after writing "LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so" into apache2.conf and try to restart apache it fails.
Nothing in log. No comments at all, and placing # before the line LoadModule solves the problem but doesn't give me wsgi.

So, how to now?

Pit

Graham Dumpleton

unread,
Mar 3, 2025, 3:17:37 PMMar 3
to mod...@googlegroups.com
What operating system are you on?

What method of compiling/installing mod_wsgi did you use?

Does the file /usr/lib/apache2/modules/mod_wsgi.so exist?

If on a Linux system, check systemctl service logs for Apache.

Unless it is a syntax error stopping the whole of Apache starting, there should be something in the Apache error logs.

--
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 modwsgi+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/modwsgi/7da7093b-9ef2-4895-b576-176769c34ea5n%40googlegroups.com.

Android Berg

unread,
Mar 3, 2025, 4:53:46 PMMar 3
to modwsgi
I am using Debian 11.
I did ./configure and make, make install
The file does exist, I made a wsgi.load file in /etc/apache2/mods-available and a2enmod him.
a2enmod ask you to restart apache and that fail.

systemd[1]: apache2.service: Failed with result 'exit-code'.
systemd[1]: Failed to start The Apache HTTP Server.
systemd[1]: Starting The Apache HTTP Server...
apachectl[82075]: Action 'start' failed.

Nothing in /var/log/apache2/error.log

Thx, Nico


Op maandag 3 maart 2025 om 21:17:37 UTC+1 schreef Graham Dumpleton:

Graham Dumpleton

unread,
Mar 3, 2025, 6:40:16 PMMar 3
to mod...@googlegroups.com
Dod you also have PHP module for Apache installed and enabled?

Android Berg

unread,
Mar 4, 2025, 3:21:59 AMMar 4
to modwsgi
Yes i have!
Nico

Op dinsdag 4 maart 2025 om 00:40:16 UTC+1 schreef Graham Dumpleton:

Graham Dumpleton

unread,
Mar 4, 2025, 3:25:17 AMMar 4
to mod...@googlegroups.com
If you are not using PHP try disabling that module. It can sometimes cause conflicts, especially if you are using Anaconda Python and not the operating system Python.

The other thing you can try is not to use configure/make/make install method for installing mod_wsgi. Instead. use pip install method. See:

Android Berg

unread,
Mar 4, 2025, 5:04:06 AMMar 4
to modwsgi
I did use the ./configure/make/make install methode!
First I used the apt install methode, that gave the same problem. To try tackle the problem i did apt remove and apt purge to delete the system version.
Then i used ./configure/ make / make install

And i have multiple WordPress sites running. So php is in heavy use.

Nico

Op dinsdag 4 maart 2025 om 09:25:17 UTC+1 schreef Graham Dumpleton:

Graham Dumpleton

unread,
Mar 4, 2025, 5:06:43 AMMar 4
to mod...@googlegroups.com
So if occurred with system package for mod_wsgi, then is likely a configuration issue. What do you have in the wsgi.load file?

Android Berg

unread,
Mar 4, 2025, 6:20:24 AMMar 4
to modwsgi
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so

This is the wsgi.load file in /etc/apache2/mods-available directory.

Nico

Op dinsdag 4 maart 2025 om 11:06:43 UTC+1 schreef Graham Dumpleton:

Graham Dumpleton

unread,
Mar 4, 2025, 2:43:59 PMMar 4
to mod...@googlegroups.com
What mod_wsgi configuration did you place elsewhere in the Apache configuration files?

If you comment out all mod_wsgi configuration in other files, leaving just the LoadModule line, does it still fail, even when using the operating system package for mod_wsgi?

Android Berg

unread,
Mar 5, 2025, 3:29:21 AMMar 5
to modwsgi
On this moment i use the own made version 5.0.2, there are no other config file edit beside wsgi.load. I go and will try the os package again in the evening.
Thx so far.

Nico

Op dinsdag 4 maart 2025 om 20:43:59 UTC+1 schreef Graham Dumpleton:
Reply all
Reply to author
Forward
0 new messages