Skip to content
Advertisement

Only the first Django site to be loaded works

I recently submitted a problem to stackoverflow titled Django infinite loading after multiple requests on apache using mod_wsgi. Anyways, I have recently changed a lot of that code and now I have a new problem. The first Django website I request works, however, the second one points to the first one I loaded and gives the response DisallowedHost because obviously it is trying to access that Django application with a different domain name. I obviously want it to do that it should do so if anyone can help me that would be great. Here is all my code.


EDIT: Using Razenstein’s suggestions my websites now stall, meaning they won’t load.

EDIT #2 I get this error every time I try connect to neostorm.us.to (my first website) [Sun Apr 03 19:26:58.563023 2022] [ssl:info] [pid 17528:tid 2116] [client 10.0.0.138:59334] AH01964: Connection to child 147 established (server astinarts.uk.to:443)

EDIT #3 No luck yet, I have updated my version of XAMPP with it, Apache and the problem persists. No one seems to know why this is happening. My python version if fine (3.10.4)

Vhosts

JavaScript

Site 1 WSGI file

JavaScript

Site 2 WSGI file

JavaScript

Advertisement

Answer

The problem isn’t having multiple websites, using mod wsgi or even using Windows. The actual problem is the database. For some reason (no idea why) the default database becomes corrupt.

The solution was for me to switch to MySQL from the default database. I’m not entirely sure why the default database becomes corrupt.

This is what you can do if you want to switch to MySQL.

Inside of your settings.py find DATABASES and make it this.

JavaScript

See this for more information: Django website fails to load after request

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement