New domain on VPS root location

We are using virtuozzo VPS on a debian linux server and a new subdomain has been created by our host provider for us. Our provider has responded with a new ip for the domain and I can verify the DNS has propogated. As an apache message displays for me at this subdomain URL

However I cannot for the life of me find where the web server root for that domain is. The host provider can't help me as I am in an unsupported VPS version they say. Also we do not have plesk in operation - just SSH. I would appreicate if someone can give me instructions to how I locate the server root for this sub domain.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Creating a subdomain in DNS doesn't have any impact on what happens on the webserver.  All it does is add a new record that says " resolves to IP x.x.x.x".  This is almost like being added to the phone book - you say "John Doe can be found at 123 cherry lane", but doing that does not build a house at 123 Cherry Lane, it's just a pointer :)

So you now have to tell the web server that it must answer for the new subdomain.  If it is an Apache web server, you would add a VirtualHost directive and this is where you'd specify the root folder for the subdomain, along with some other directives.  If it's a Linux VPS, you are very likely running Apache, and the config file is probably in /etc/httpd/conf/httpd.conf

At the very end, you'd add your new host, something like the code below.  Then run:

  /etc/init.d/httpd configtest

This will test the syntax to make sure you didn't break anything.  If that tests with a "Syntax OK" you can then do:

  /etc/init.d/httpd restart

This will restart your Apache web server and your new subdomain should now be accessible - be sure to put some kind of identifying index.html in your new DocumentRoot so that you can see if it worked.
    DocumentRoot /var/www/html/subdomain
    ErrorLog logs/sub-error_log
    CustomLog logs/sub-access_log combined

Open in new window

Needy11Author Commented:
Thanks for this but I think my configuration is slightly different. It looks to me like there is a directadmin-vhosts file that perhaps this needs to go into. So I believes this means I need ot figure out how to do the above via direct admin itself..

Do you know how to do this in VPS. It doesn't look straight forward. The main domain has been up till now but is pointing to a new IP via the DNS but this needs to be configured in the VPS... stuck?

I'm not familiar with Virtuozzo, but ultimately you will have to find which of the config files controls the virtual hosts if you do not have a web interface that you can manage them through.

It's possible that your VPS has command-line pseudo-GUI tools too.  Do you have any documentation?

If not, then the best I could probably offer you is that I could log in and figure it out.  If you have any interest in that, use my Hire Me link to send me IP and authentication information.  If it's (as I suspect) a no-brainer, I will fix it for just the point value of this question, and no more.
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Needy11Author Commented:
Very kind of you xterm. Yes I think that is a good suggestion. 2 things before making that jump

1. the domain is a subdomin of Yet is not listed on the Direct Admin panel anywhere but is marked up as forwarding in the hosted control panel. Does the parent domain have to be set to parked for a subdomain to be created.

2. Being conservative what is the best protection for me to let you view the settings. I have to be security conscious should anything go wrong.

1.  The first thing I notice, is that the subdomain doesn't even resolve to the same IP as the domain:

[xterm@foo ee]$ host has address
[xterm@foo ee]$ host has address
[xterm@foo ee]$ host has address

Your subdomain looks to resolve to a different IP (.21, instead of .83)  Are both of those IP addresses on the same VPS, or not?  Because if not, the default premise of what you've stated in the question above is wrong - DNS may have propagated, but it's not correct.

2.  Let's explore the above first, but ultimately if you want me to log in, you'll have to take a leap of faith and trust both me, and the integrity of Experts Exchange in general.  I've administrated Unix servers for a living for 16 years and have well over 100 in my care at my "real" job now, so there's no incentive or novelty for me to do harm.  So, entirely your call.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Needy11Author Commented:
Cheers xterm with 1 you have hit a nail on teh head. I haven't mis stated. is currently forward to the domain whle we want to be a hosted\parked domain with an application on it. Yes bith IP address are on teh same IP.

Regards 2 - thanks for teh assurance and that will be good enough for me. What is best way of providing access details to Dirct Admin without broadcasting them here?
Needy11Author Commented:
I contacted xterm directly on this problem and he was very helpful and clear in the resolution of this problem for me. I highly recommend him.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.