Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9228977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:27:34+00:00 2026-06-18T05:27:34+00:00

I have set up a linux box mainly for testing and I have got

  • 0

I have set up a linux box mainly for testing and I have got to a stage were apache, mysql and php are running. I followed tutorials on how to set up virtual hosts so I can point domains to it but something strange is happening.
This is my httpd-vhosts.conf file that I have included in my httpd.conf file:

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName thedomain.co.uk
  DocumentRoot /var/www/thedomain
</VirtualHost>

When I go to thedomain.co.uk it is pointing to the correct place as you’d expect. But when I go to my servers ip, internal or external it is going to the same directory as the virtual host. Could you guys think of any reason that is? I would expect it to go to /var/www/html by default? Oh and I’m running CentOS 6.3

Thanks in advance for any answers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:27:35+00:00Added an answer on June 18, 2026 at 5:27 am

    You have used wildcard to point everything at DocumentRoot /var/www/thedomain

    You need to create second listing :

    <VirtualHost myotherdomain.co.uk:80>
      ServerName myotherdomain.co.uk
      DocumentRoot /var/www/myotherdomain
    </VirtualHost>
    

    where your other domain is whatver ip and the document root, points to your choise.

    The first vhost listing is also used as the default … so if you were to use localhost it would resolve to whatever is first in list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a postgresql 8.3 db set up on linux box, together with a
I am running a Linux box running 2.6.9-55.ELsmp, x86_64. I am trying to set
I have a server running Oracle, IP is 192.168.1.50. On my linux box, I
Linux Server Box running WebSphere MQ Server v7.1: I have created a user 'mq-user'
I have a FreeBSD box with Bash set up. I'm used to Debian Linux
I have set up and installed both interprolog and swi prolog on my linux
I have a set of changes which work perfectly against a certain linux version,
On Ubuntu Linux, with Bash, I have /etc/profile set with read-only variables on login.
I have a Mercurial repository set up on a Linux server, and some (but
I have set up upload_max_filesize and post_max_size to 32Mb in php.ini. I am using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.