Django.fun

Deploy django on apache server is not working

I'm trying to setup an apache server running django but I have have some troubles to make it run it well.

At this moment it seems to be correctly configures but i can not access now.

this is how my apache log file looks

apache:

[Thu Oct 21 22:29:36.608487 2021] [suexec:notice] [pid 16400] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Oct 21 22:29:36.946497 2021] [:notice] [pid 16414] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:29:36.991981 2021] [mpm_prefork:notice] [pid 16414] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Thu Oct 21 22:29:36.992010 2021] [core:notice] [pid 16414] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:29:49.610060 2021] [mpm_prefork:notice] [pid 16414] AH00169: caught SIGTERM, shutting down
[Thu Oct 21 22:29:49.759118 2021] [suexec:notice] [pid 17390] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Oct 21 22:29:49.868100 2021] [:notice] [pid 17393] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:29:49.886537 2021] [mpm_prefork:notice] [pid 17393] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Thu Oct 21 22:29:49.886565 2021] [core:notice] [pid 17393] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:29:51.173110 2021] [mpm_prefork:notice] [pid 17393] AH00171: Graceful restart requested, doing restart
[Thu Oct 21 22:29:51.355561 2021] [:notice] [pid 17393] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:29:51.355846 2021] [mpm_prefork:notice] [pid 17393] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Thu Oct 21 22:29:51.355859 2021] [core:notice] [pid 17393] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:29:53.644638 2021] [mpm_prefork:notice] [pid 17393] AH00171: Graceful restart requested, doing restart
[Thu Oct 21 22:29:53.840006 2021] [:notice] [pid 17393] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:29:53.840308 2021] [mpm_prefork:notice] [pid 17393] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Thu Oct 21 22:29:53.840325 2021] [core:notice] [pid 17393] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:30:31.026473 2021] [mpm_prefork:notice] [pid 17393] AH00171: Graceful restart requested, doing restart
[Thu Oct 21 22:30:31.213746 2021] [:notice] [pid 17393] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:30:31.214045 2021] [mpm_prefork:notice] [pid 17393] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Thu Oct 21 22:30:31.214058 2021] [core:notice] [pid 17393] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:30:56.977303 2021] [mpm_prefork:notice] [pid 17393] AH00171: Graceful restart requested, doing restart
[Thu Oct 21 22:30:57.138252 2021] [:notice] [pid 17393] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:30:57.138551 2021] [mpm_prefork:notice] [pid 17393] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Thu Oct 21 22:30:57.138569 2021] [core:notice] [pid 17393] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:31:05.179507 2021] [mpm_prefork:notice] [pid 17393] AH00171: Graceful restart requested, doing restart
[Thu Oct 21 22:31:05.346647 2021] [:notice] [pid 17393] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:31:05.346940 2021] [mpm_prefork:notice] [pid 17393] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Thu Oct 21 22:31:05.346953 2021] [core:notice] [pid 17393] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:33:25.584547 2021] [mpm_prefork:notice] [pid 17393] AH00169: caught SIGTERM, shutting down
[Thu Oct 21 22:35:29.514733 2021] [suexec:notice] [pid 26633] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Oct 21 22:35:29.825628 2021] [:notice] [pid 26651] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:35:29.836576 2021] [mpm_prefork:notice] [pid 26651] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 mod_wsgi/4.5.17 Python/2.7 configured -- resuming normal operations
[Thu Oct 21 22:35:29.836603 2021] [core:notice] [pid 26651] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:35:37.630674 2021] [mpm_prefork:notice] [pid 26651] AH00169: caught SIGTERM, shutting down
[Thu Oct 21 22:35:37.781332 2021] [suexec:notice] [pid 26727] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Oct 21 22:35:37.853461 2021] [:notice] [pid 26730] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:35:37.861610 2021] [mpm_prefork:notice] [pid 26730] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 mod_wsgi/4.5.17 Python/2.7 configured -- resuming normal operations
[Thu Oct 21 22:35:37.861639 2021] [core:notice] [pid 26730] AH00094: Command line: '/usr/sbin/apache2'
[Thu Oct 21 22:35:52.560775 2021] [mpm_prefork:notice] [pid 26730] AH00169: caught SIGTERM, shutting down
[Thu Oct 21 22:35:52.712133 2021] [suexec:notice] [pid 26766] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Thu Oct 21 22:35:52.766929 2021] [:notice] [pid 26772] mod_ruid2/0.9.8 enabled
[Thu Oct 21 22:35:52.771700 2021] [mpm_prefork:notice] [pid 26772] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 mod_wsgi/4.5.17 Python/2.7 configured -- resuming normal operations
[Thu Oct 21 22:35:52.771728 2021] [core:notice] [pid 26772] AH00094: Command line: '/usr/sbin/apache2'

This is my apache conf

<VirtualHost 172.31.11.12:80>

    ServerName comodovenezuela.xyz
    ServerAlias www.comodovenezuela.xyz
    ServerAdmin info@comodovenezuela.xyz


<Directory /home/proyecto/proyecto>
<Files wsgi.py>
Require all granted
</Files>
</Directory>


WSGIDaemonProcess proyecto python-home=/home/proyecto python-path=/home/proyecto
WSGIProcessGroup proyecto
WSGIScriptAlias / /home/proyecto/proyecto/wsgi.py

</VirtualHost>

When I try to access it says 504 gateway timeout :(

Answers: 1

Answered by Razenstein, Oct. 23, 2021, 7:50 a.m.

Check "python-home" ... it should point to your virtual environment!