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

  • Home
  • SEARCH
  • 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 7572011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:48:57+00:00 2026-05-30T15:48:57+00:00

Don’t think my virtualhost is working correctly. This is what I have inside of

  • 0

Don’t think my virtualhost is working correctly. This is what I have inside of httpd.conf…it is the last thing in the file:

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /var/www/html/testing
ServerName testing.aa.local
</VirtualHost>

In my /etc/hosts file:

127.0.0.1 testing.aa.local

Now when I go to testing.aa.local it shows the index page of the root of the site. In httpd.conf the document root is DocumentRoot /var/www/html. It appears it is taking that document root and not the VirtualHost documentroot. When I restart httpd there are no errors. When I say httpd -S it says:

$ sudo /usr/sbin/httpd -S 
VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers:
_default_:443          aa.local (/etc/httpd/conf.d/ssl.conf:81)
*:*                    aa.local (/etc/httpd/conf/httpd.conf:974)
*:80                   is a NameVirtualHost
         default server testing.aa.local (/etc/httpd/conf/httpd.conf:1031)
         port 80 namevhost testing.aa.local (/etc/httpd/conf/httpd.conf:1031) Syntax OK

Anyone understand why when I go to testing.aa.local it is showing me the index page of /var/www/html rather than /var/www/html/testing? Again, /var/www/html is defined as the httpd.conf file as the DocumentRoot but later on I declare the virtualhost container and so I thought it should overwrite it?

  • 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-05-30T15:48:58+00:00Added an answer on May 30, 2026 at 3:48 pm

    In my httpd.conf file there are a virtualhost container all ready. I commented it out and it now works.

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

Sidebar

Related Questions

Don't overthink this - there's a very commonly used term and I ... have
Don't know if this has been answered before. Have custom routes to users. If
Don't know why but I can't find a solution to this. I have 3
Don't think this is a repost, difficult to search for the word between because
don't know better title for this, but here's my code. I have class user
Don't ask me how but I'm in a situation where I have DCPs published
don't know what happened in my jcrop selection. I think I pressed some keys
Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything,
I don't know why, but this code worked for me a month ago... maybe
I have just tried to save a simple *.rtf file with some websites and

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.