Jump to content

Recommended Posts

Based on the main httpd.conf file one would use extra\httpd-vhosts.conf to specify virtual directories.

 

The main file says that if a server name does not match any of the virtual servers defined, apache will default to the root dir specified in the "main" config file.

 

That is NOT happening.

 

If a server name doesnt match any of the virtual directories defined in httpd-vhosts.conf , apache assumes that the root dir is the same as the one specified within the first defenition (the one at the top of the httpd-vhosts.conf file)

 

What am I missing?

That is correct. If you want to use any vhosts you need to make all your sites (including the default) vhosts.

 

Thanks, so just to be clear - we now know that the server behaves in the way we described. No questions there. I just want to see if there is a reason why Apache conf file comments state the following:

 

# 'Main' server configuration

#

# The directives in this section set up the values used by the 'main'

# server, which responds to any requests that aren't handled by a

# <VirtualHost> definition.  These values also provide defaults for

# any <VirtualHost> containers you may define later in the file.

#

# All of these directives may appear inside <VirtualHost> containers,

# in which case these default settings will be overridden for the

# virtual host being defined.

#

 

#

# ServerAdmin: Your address, where problems with the server should be

# e-mailed.  This address appears on some server-generated pages, such

# as error documents.  e.g. admin@your-domain.com

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.