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 8156189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:52:24+00:00 2026-06-06T16:52:24+00:00

I downloaded apache2.2.22 src from http://httpd.apache.org/download.cgi and made the installation. The installation works fine.

  • 0

I downloaded apache2.2.22 src from http://httpd.apache.org/download.cgi and made the installation. The installation works fine. But the problem arises when I try adding vhosts. I added 2 virtual hosts
1. localhost
2. someother.localhost
Both point to different document roots, but resolve to the doc root of the first virtualhost.

hereis my vhost file,

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "/webserver/htdocs"
    ServerName localhost
    ErrorLog "logs/localhost-error_log"
    CustomLog "logs/localhost-access_log" common
</VirtualHost>
<Directory /home/sourabhn/somepath>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "/home/sourabhn/somepath"
    ServerName someother.localhost
    ErrorLog "logs/someother-localhost-error_log"
    CustomLog "logs/someother-localhost-access_log" common
</VirtualHost>

I have made the appropriate entry in the hosts file. I am running a Ubuntu 11.10 machine. Please get back with your valuable suggestions

  • 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-06T16:52:25+00:00Added an answer on June 6, 2026 at 4:52 pm

    Right away I noticed a difference between your file and the one I cobbled together from net tutorials like this from bobpeers. I’ve added within the virtual host block the <Directory> block.

    NameVirtualHost *:80
    <VirtualHost *:80>
    DocumentRoot /var/www/
    ServerName xtiansimonslaptop.local
        <Directory "/var/www/">
            Allow from all
            Options +Includes +Indexes +FollowSymLinks
            AllowOverride all
        </Directory>
    </VirtualHost>
    

    I’m working on Drupal and just so I can get a name resolved to the Drupal directory, it will take care of the rest. In the Drupal install I have several projects each with their own domain name set up in one Drupal installtion. Below is the example of a Drupal site named hello.local, and another of my Drupal sites could be cheese.local. Both pointing to the same Directory.

    <VirtualHost *:80>
        DocumentRoot /var/www/php/drupal7
        ServerName hello.local
    #   ServerAlias *.hello.local
            <Directory "/var/www/php/drupal7">
                Allow from all
                Options +Includes +Indexes +FollowSymLinks
                AllowOverride all
            </Directory>
    </VirtualHost>
    

    Right now its working save for the commented line ServerAlias. Which brings up another point I learned about setting up vHosts. The /etc/hosts file is important to get set up properly.

    In the example by bobpeers you’ll see their hosts entry example,

    ServerName bobpeers.live
    ServerName bobpeers.dev
    

    I would expect the reverse name live.bobpeers.local to be a clearer example of a server name. And this is the thing–I find there is inconsistency in examples. Some examples simply do not use key terms like .local or follow the generic signature sub-domain.domaon.com. Copying one persons non-normal example you may think the above ServerName references two virtual hosts, live.local and dev.local. For all I know, maybe they do!

    One more thing about vHosts. The man page shows this,

       127.0.0.1       localhost
       192.168.1.10    foo.mydomain.org       foo
       192.168.1.13    bar.mydomain.org       bar
    

    What works for my localhost sandbox is this,

       127.0.0.1    localhost
       127.0.0.1    mydomain.local           mydomain
       127.0.0.1    foo.mydomain.local       foo
       127.0.0.1    bar.mydomain.local       bar
    

    Which seems correct since name based is supposed to sort it all out, and not this 192.168.1.x IP Mask nonsense. (^_^)

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

Sidebar

Related Questions

I downloaded apache-tomcat-7.0.20.tar.gz from here => http://tomcat.apache.org/download-70.cgi Now how can i install/configure it manually
I downloaded Axis 1.4 ( http://www.nic.funet.fi/pub/mirrors/apache.org/ws/axis/1_4/ ) and I wanted to use WSDL2Java, but
I have: ubuntu-9.10-desktop-amd64 + NetBeans6.7.1 I just downloaded Commons HttpClient 3.1 (legacy) from http://hc.apache.org/downloads.cgi
I downloaded and extract jmeter's source code: http://jmeter.apache.org/download_jmeter.cgi How do I go about opening
I have downloaded solr from : http://svn.apache.org/repos/asf/lucene/dev/trunk/ and when i try to start solr
I have downloaded Service archive and code generator wizard plugin for Eclipse (From http://axis.apache.org/axis2/java/core/tools/index.html
I'm using xerces(http://xerces.apache.org) lib to parse a XML file in C++, so I downloaded
I am going through the Tapestry beginner tutorial at: http://tapestry.apache.org/tapestry-tutorial.html I just downloaded the
i have downloaded flume from https://github.com/apache/flume/downloads ..but i am unable to build it..do i
WHEN I WAS INSTALLING WSGI MODULE FOR APACHE I downloaded the module from http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-win32-ap22py27-3.3.so

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.