Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

I'm using cpanel on

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.

share|improve this question

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.

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.