I have hosted a Django-based website, which is running on Apache2, on an AWS Lightsail Ubuntu 20.04 instance.
The website is accessible when you use the ip, 18.133.43.205. But when I try to search my website using the domain, roosta.xyz, the connection times out.
The DNS is using AWS's nameservers. I don't believe that the DNS is the problem as when I do a whois look up, it shows the AWS nameservers and when I run dig roosta.xyz in the linux terminal the correct ip is returned.
A few days ago, I was getting a response from my server but it was requesting to use https, but I don't have a ssl certificate so my browser freaked out. I don't want to use https. But after meddling with the server, trying to stop it wanting to use https, I'm now back to the connection just timing out.
Another thing is that I ran curl roosta.xyz on my own machine's terminal and it returns the html for the webpage? So how is chrome not getting that?!
Here's a copy of the apache virtual host config file:
<VirtualHost *:80>
ServerName www.roosta.xyz
ServerAdmin webmaster@localhost
ServerAlias roosta.xyz
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static /home/ubuntu/myWebsite/static
<Directory /home/ubuntu/myWebsite/static>
Require all granted
</Directory>
<Directory /home/ubuntu/myWebsite/myWebsite>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIScriptAlias / /home/ubuntu/myWebsite/myWebsite/wsgi.py
WSGIDaemonProcess myWebsite_app python-path=/home/ubuntu/myWebsite python-home=/home/ubuntu/myWebsite/venv
WSGIProcessGroup myWebsite_app
</VirtualHost>
Apache2ctl -S
VirtualHost configuration:
*:80 roosta.xyz (/etc/apache2/sites-enabled/myWebsite.conf:2)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
I completely stumped after searching the web for hours on end. I am more than happy to provide more relevant code or pictures of lightsail settings to help solve my problem.