Report this

What is the reason for this report?

I am trying to host multiple django websites using apache2, but only one website is working.

Posted on March 28, 2021
Petr Rudolf Maleček

By Petr Rudolf Maleček

CEO & Founder at Systexo

Hello, So I am trying to deploy two django sites to my droplet. I am using apache2, mod_wsgi, and wsgi.

What I did is that I have secured all the secret keys for the sites, set up all the virtual environments, etc. I have also created two configuration files for the websites, I also did all the domain settings. I am getting no issues in the apache2 error.log file.

But for some reason, when I go to either systexo.com or www.systexo.com I keep getting the Bad request. Even though I have allowed these domains in ALLOWED_HOSTS and set them all up on the Networking page.

I am so lost, since the page I have set up before works without issues, and you can go to the site. But the second site simply isn’t working and I have no idea what I have done wrong.

Could you please help me? Also, the site I have hosted before is https://www.georgegr.xyz/, which works without any issue.

Thank you in advance for your help, it is greatly appreciated :)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.