I'm running a site on an apache server named www.example.com which has sub.example.com subdomain. Also I have a vps, which is accessable through x.x.x.x IP adress. sub.example.com is redirected to x.x.x.x/example with htaccess So I can reach my files on x.x.x.x/example through sub.example.com.

Everything is ok with this. But I want to solve this issue with DNS. How can I achieve that?

I'm using cpanel on www.example.com.

I searched a lot about that issue and find some information. I just know I have to create an A record for subdomain pointing x.x.x.x Also I read about i should set virtual server on apache. But I'm not fully aware of apache settings. One last thing is I want my subdomain to point only x.x.x.x/example. So I need a step by step guide.

link|improve this question
feedback

1 Answer

In cpanel under domains, there is an option for subdomain. You basically give cpanel the subdomain (sub) and the folder you want it to point to (/public_html/example). Then hit create. Here is a video walkthrough.

http://www.everymanhosting.com/cpanel-tutorials/create-subdomains.php

link|improve this answer
I guess, you got me all wrong. – user104036 Dec 14 '11 at 0:02
feedback

Your Answer

 
or
required, but never shown