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 :)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
I can see that both websites are up and running now. Would you mind sharing here with the community how did you get them working?
Regards, Bobby
The issue was with the configuration file, it may seem logical to change the Virtual host to something like 81, instead of using the default port 80. So my suggestion is to keep all the config files on port 80. Apache2 automatically redirects to the correct site when you have domains added to each one. If you want to use other ports, you will need to configure that in apache configuration files, feel free to check https://askubuntu.com/questions/916923/apache-config-how-to-enable-additional-ports .
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.