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

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

I have my Django project with an SSL certificate from Let’s Encrypt, deployed on an Ubuntu 22.04 (LTS) x64 virtual machine from Digital Ocean.
When I navigate to the page using my domain, it redirects me to my page correctly, but when I use the IP address, it redirects me to the apache default page.
I have a PTR record active on the Digital Ocean site:
IPv4: ip address .......
AddressPTR Record: [www.mydomain.com](http://www.mydomain.com/).
The ip address added to the ALLOWED_HOSTS var on my settings.py:
ALLOWED_HOSTS = ['www.mydomain.com', 'my ip address']
What I have in /etc/apache2/sites-available/my_project.conf:
<VirtualHost *:80>
ServerName mydomain.com
ServerAlias [www.mydomain.com](http://www.mydomain.com/)
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.mydomain.com [OR]
RewriteCond %{SERVER_NAME} =mydomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
The traffic allowed in my server:
Status: active
---
22/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
Apache Full ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
Apache Full (v6) ALLOW Anywhere (v6)
Before getting the SSL certificate, it worked using the ip address as well but, when I set the certificate, it just returns the apache default page. I set the certificate following this five step tutorial:https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-22-04
I hope that’s the right information in order to get an answer, I’m learning Django and Web Development in general, I hope this question makes sense.
hashembarret@gmail.com
Witomir Łękowski
doug.landau
5350d4b31109448dbeb34a6ffc857a
RuRo
max johnson
rem3n
bo
d.mckinstry
Jim Cason
Charles kubai
Charles kubai