Greetings and please excuse me if this is a very basic question.
The problem:
Currently I have bought a domain (crazywebsite.com) from Godaddy.com and I have an unmanaged VPS in Site5.com.
I have set up a LAMP stack (Debian, Apache2, MySQL, PHP Laravel) in my my Debian machine in Site5.com and currently I have my IP and website look and accessible like this:
292.168.0.1./website (Just an example IP)
292.168.0.1./forum
The question:
How I can achieve the following?
crazywebsite.com => 292.168.0.1./website
forum.crazywebsite.com => 292.168.0.1./forum
So when you write down the domain I bought you see the website's content (instead of accessing it via the IP link of course).
Any ideas or links how to do this?
Currently I have tried the following:
Added settings in:
/etc/apache2/sites-available/default
to:
# website
<VirtualHost *:80>
ServerName crazywebsite.com
ServerAlias crazywebsite.com
DocumentRoot /var/www/website
</VirtualHost>
<VirtualHost *:80>
ServerName www.crazywebsite.com
ServerAlias www.crazywebsite.com
DocumentRoot /var/www/website
</VirtualHost>
# forum
<VirtualHost *:80>
ServerName forum.crazywebsite.com
ServerAlias forum.crazywebsite.com
DocumentRoot /var/www/forum
</VirtualHost>
<VirtualHost *:80>
ServerName www.forum.crazywebsite.com
ServerAlias www.forum.crazywebsite.com
DocumentRoot /var/www/forum
</VirtualHost>
Thahk you in advance!
Edit:
As suggested by @Sven, I had made my A records in GoDaddy.com. Can anyone confirm this is correct? I have created two domains NS1 and NS2 for name servers (just in any case) and one "referrals" which I will be needing as a subdomain.
Am I required to do any other settings on my Debian server (like BIND9 and so on?) or I just need to wait until the DNS get updated.
EDIT:
These settings have WORKED. Now the only problem I have is that I cannot point http://crazywebsite.com to 123.456.789.000/mywebsite. Instead, it always shows the root folder "/". Any suggestions?