I have bought a server from linode.com and set it up with my purchased domain from namecheap. Setting up the DNS worked as expected and I followed the official documentation from linode.
But whenever I am trying to set up a subdomain in the same server, despite following the same documentation, for some reason I can't set it up.
Here is the config: Server: Apache on Ubuntu 18.04 Domain: randomxyz.xyz
Here are the steps that I followed:
- Created AAAA record in Linode Manager Panel.
IP -> Server IP. Hostname -> temp.
- SSH into the server.
- created a folder named temp.randomxyz.xyz inside var/www/html.
- created public_html, log and backups folders for temp.randomxyz.xyz.
- created temp.randomxyz.xyz.conf in etc/apache2/sites-available
- put Vhost config in the conf file:
# domain: randomxyz.xyz # public: /var/www/html/randomxyz.xyz/public_html/ <VirtualHost *:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin firstname.lastname@example.org ServerName temp.randomxyz.xyz ServerAlias temp.randomxyz.xyz # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /var/www/html/temp.randomxyz.xyz/public_html # Log file locations LogLevel warn ErrorLog /var/www/html/temp.randomxyz.xyz/log/error.log CustomLog /var/www/html/temp.randomxyz.xyz/log/access.log combined </VirtualHost>
- Enable the new configured site: a2ensite temp.randomxyz.xyz
- Reload Apache: systemctl restart apache2
I have waited for more than 48 hours. The Subdomain is not working.
Also, pinging to the subdomain gives this result:
Ping request could not find host temp.randomxyz.xyz. Please check the name and try again.
What am I missing here? Do I have to do something in namecheap manager?