How to view my Linode's site without DNS
Is it possible to view my Linode's website even if a domain isn't pointing to my Linode anymore?
Short answer: Yes! This is possible.
The best way to achieve this is to make some small adjustments to your Apache configuration and then use your Linode's IP address in your browser's navigation bar instead of the domain name.
It sounds like your Apache is currently configured to work with the domain name that is now pointing somewhere else. You'll need to reconfigure it now to work with the IP address assigned to your Linode. To do this, you'll have to set up your site's virtual host block in your 000-default.conf file, enable that file, and then restart Apache.
Here's an example of what your site's virtual host block may look like via this helpful Stack Overflow post:
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerAlias <IP address> DocumentRoot /somewhere/public_html <Directory /somewhere/public_html/> Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride Authconfig FileInfo Require all granted </Directory> </VirtualHost>
This is what you'll want to set up (depending on your site's virtual host configuration of course) to be present in your 000-default.conf file.
Once that is set up, you'll want to enable the 000-default.conf file (replace
/path/to/file with your file path):
sudo a2ensite /path/to/file/000-default.conf
And then restart Apache:
sudo systemctl restart apache2
This should allow you to then type your Linode's IP address into your browser and then view your site's content!
Here are some super useful examples of virtual host configurations straight from Apache:
And here's a link to our Apache guides:
Hope this helps!