Revision history [back]
Apache 2.4 config for askbot 0.11.x
Hi, I try to set up an askbot 0.11.x (more precise 0.11.8). I have askbot 0.11.8 and apache 2.4 installed in a docker container.
After running
askbot-setup -r /opt/b2-askbot --proj-name b2-askbot --admin-name "Matthias Schnepf" --admin-email "matthias.schnepf@kit.edu" --db-engine=sqlite --db-name askbot-db --force --noinput
python manage.py migrate
python manage.py collectstatic
python manage.py makemigrations
python manage.py migrate
I can run the website with python manage.py runserver
hostname -i:8000
However, when I use my apache config, based on the example, I get first a Forbidden
in my browser. That can be fixed by adding
<Location />
require all granted
</Location>
in the Apache config and downloading the django.wsgi from the askbot GitHub.
However, now the website does not load, and in the Apache log I just see:
[Fri Jun 07 14:10:34.598309 2024] [wsgi:debug] [pid 463:tid 139732459718208] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 0 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598328 2024] [wsgi:debug] [pid 463:tid 139732449232448] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 1 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598362 2024] [wsgi:debug] [pid 463:tid 139732438746688] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 2 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598417 2024] [wsgi:debug] [pid 463:tid 139732428260928] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 3 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598454 2024] [wsgi:debug] [pid 463:tid 139732417775168] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 4 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598500 2024] [wsgi:debug] [pid 463:tid 139732407289408] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 5 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598526 2024] [wsgi:debug] [pid 463:tid 139732396803648] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 6 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598591 2024] [wsgi:debug] [pid 463:tid 139732386317888] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 7 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598611 2024] [wsgi:debug] [pid 463:tid 139732375832128] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 8 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598648 2024] [wsgi:debug] [pid 463:tid 139732365346368] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 9 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598696 2024] [wsgi:debug] [pid 463:tid 139732354860608] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 10 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598756 2024] [wsgi:debug] [pid 463:tid 139732344374848] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 11 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598784 2024] [wsgi:debug] [pid 463:tid 139732333889088] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 12 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598819 2024] [wsgi:debug] [pid 463:tid 139732323403328] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 13 in daemon process 'askbot2'.
[Fri Jun 07 14:10:34.598862 2024] [wsgi:debug] [pid 463:tid 139732312917568] src/server/mod_wsgi.c(9142): mod_wsgi (pid=463): Started thread 14 in daemon process 'askbot2'.
[Fri Jun 07 14:10:45.308887 2024] [authz_core:debug] [pid 464:tid 139732396803648] mod_authz_core.c(815): [client 10.0.0.1:56110] AH01626: authorization result of Require all granted: granted
[Fri Jun 07 14:10:45.308916 2024] [authz_core:debug] [pid 464:tid 139732396803648] mod_authz_core.c(815): [client 10.0.0.1:56110] AH01626: authorization result of <RequireAny>: granted
[Fri Jun 07 14:10:45.308982 2024] [authz_core:debug] [pid 464:tid 139732396803648] mod_authz_core.c(815): [client 10.0.0.1:56110] AH01626: authorization result of Require all granted: granted
[Fri Jun 07 14:10:45.308988 2024] [authz_core:debug] [pid 464:tid 139732396803648] mod_authz_core.c(815): [client 10.0.0.1:56110] AH01626: authorization result of <RequireAny>: granted
[Fri Jun 07 14:10:45.316106 2024] [wsgi:info] [pid 463:tid 139732459718208] mod_wsgi (pid=463): Create interpreter 'askbot.belle2.org|'.
[Fri Jun 07 14:10:45.319862 2024] [wsgi:info] [pid 463:tid 139732459718208] [remote 10.0.0.1:56110] mod_wsgi (pid=463, process='askbot2', application='askbot.belle2.org|'): Loading Python script file '/opt/b2-askbot/django.wsgi'.
[Fri Jun 07 14:10:45.910401 2024] [wsgi:error] [pid 463:tid 139732459718208] b"WARNING!!! You are using a 'locmem' (local memory) caching backend,\\nwhich is OK for a low volume site running on a single-process server.\\nFor a multi-process configuration it is neccessary to have a production\\ncache system, such as redis or memcached.\\n\\nWith local memory caching and multi-process setup you might intermittently\\nsee outdated content on your site.\\n"
[Fri Jun 07 14:15:45.359806 2024] [wsgi:error] [pid 464:tid 139732396803648] [client 10.0.0.1:56110] Timeout when reading response headers from daemon process 'askbot2': /opt/b2-askbot/django.wsgi
[Fri Jun 07 14:15:45.620317 2024] [wsgi:info] [pid 463:tid 139732480689728] mod_wsgi (pid=463): Daemon process deadlock timer expired, stopping process 'askbot2'.
[Fri Jun 07 14:15:45.620653 2024] [wsgi:info] [pid 463:tid 139732494321536] mod_wsgi (pid=463): Shutdown requested 'askbot2'.
[Fri Jun 07 14:15:50.621218 2024] [wsgi:info] [pid 463:tid 139732061259328] mod_wsgi (pid=463): Aborting process 'askbot2'.
[Fri Jun 07 14:15:50.621272 2024] [wsgi:info] [pid 463:tid 139732061259328] mod_wsgi (pid=463): Exiting process 'askbot2'.
[Fri Jun 07 14:15:50.926695 2024] [wsgi:info] [pid 538:tid 139732494321536] mod_wsgi (pid=538): Attach interpreter ''.
and an Gateway Timeout
in the browser.
Since the site works via the development server, I assume it is a problem with my apache config:
WSGIPythonEggs /var/python/eggs
WSGIPythonHome /opt/askbot_venv
<VirtualHost *:80>
ServerAdmin software@belle2.org
DocumentRoot /opt/b2-askbot
ServerName askbot.belle2.org
<Location />
require all granted
</Location>
Alias /m/ /opt/b2-askbot/static/
Alias /upfiles/ /opt/b2-askbot/upfiles/
<DirectoryMatch "/opt/b2-askbot/skins/([^/]+)/media">
Order deny,allow
Allow from all
</DirectoryMatch>
<Directory "/opt/b2-askbot/upfiles">
Order deny,allow
Allow from all
</Directory>
WSGIDaemonProcess askbot2
WSGIProcessGroup askbot2
WSGIScriptAlias / /opt/b2-askbot/django.wsgi
CustomLog /var/log/apache2/askbot/access_log common
ErrorLog /var/log/apache2/askbot/error_log
LogLevel debug
</VirtualHost>
Best regards,
Matthias