Search Our Database
How to preview domain hosted site on DirectAdmin without having domain pointing at server
It is common knowledge that you need to point your domain to a server before you can access the site using the domain. However, if for some reason you would like to preview your website without your domain, you may do so. Follow the tutorial guide closely and you will be able to do just that.
Step 1 – Login into your web server via SSH.
Step 2 – Create a custom folder within the directory.
mkdir /usr/local/directadmin/data/template/custom
Step 3 – Change the folder’s ownership to DirectAdmin.
chown diradmin:diradmin /usr/local/directadmin/data/template/custom
Step 4 – Copy the default domain virtual host file from the default template.
cp -pa /usr/local/directadmin/data/templates/virtual_host2.conf /usr/local/directadmin/data/templates/custom/
Step 5 – Edit the custom domain virtual host file by adding the code below to the ServerAlias.
|DOMAIN|.ns$$.small-dns.net www.|DOMAIN|.ns$$.small-dns.net
*The example is based on hostname settings for the server, which requires the hostname to be pointed to the server. Replace ns$$.small-dns.net to a valid hostname.