Fresh Django with mod_wsgi and apache goes Time Out on 18.04

11 views
Skip to first unread message

Mohammad Etemaddar

unread,
Jul 7, 2018, 10:26:40 AM7/7/18
to Django users
I have installed Ubuntu server 18.04 and VirtualMin on it. installed python3-pip and then virtualenv.
Also installed libapache2-mod-wsgi-py3
Created new virtual server and configured the modwsgi for it.
Also created fresh django website for it.
But I get Timeout error!
Here is my apache configuration for mod_wsgi:

Code:
WSGIDaemonProcess username.ir python-home=/home/username/venv python-path=/home/username/website
WSGIProcessGroup username.ir


Alias /media/ /home/username/website/media/
Alias /static/ /home/username/website/static/

<Directory /home/username/website/static>
Require all granted
</Directory>

<Directory /home/username/website/media>
Require all granted
</Directory>

WSGIScriptAlias / /home/username/website/website/wsgi.py

<Directory /home/username/website/website>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Django version: 1.11.14
I have configured website like this on a Debian 9 server and worked great.
How can I solve it?

Kasper Laudrup

unread,
Jul 7, 2018, 10:46:28 AM7/7/18
to django...@googlegroups.com
Hi Mohammad,

On 2018-07-07 16:26, Mohammad Etemaddar wrote:
> I have installed Ubuntu server 18.04 and *VirtualMin* on it. installed
> python3-pip and then virtualenv.
> Also installed *libapache2-mod-wsgi-py3*
> Created new virtual server and configured the modwsgi for it.
> Also created fresh django website for it.
> But I get Timeout error!

Which kind of timeout do you get?

If you get a timeout when trying to access your site with eg. a browser,
I would try to ssh to the host and try to connect to the site locally,
eg. "telnet localhost 80". If that connects, then I would look into
whether port 80 is open in a firewall or similar.

If you get a "504 Gateway Timeout", then there's an issue with the
connection between Apache and the WSGI application. Possibly the Django
app is not running?

I cannot really come with a solution, but I hope that can help you in
troubleshooting.

Kind regards,

Kasper Laudrup
Reply all
Reply to author
Forward
0 new messages