You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jay O'Brien <ja...@att.net> on 2005/03/12 03:42:50 UTC
[users@httpd] Name-based virtual hosts questions
I have two url's both pointed in DNS to my fixed IP. I could access
the same web files using either url or by using the IP in the accessing
browser.
I added name-based hosting, following the examples in the Apache manual.
When I access the server using the IP, I get the files for the first
virtual entry. Using either url to access the server, I get the correct
files. It appears that the implementation of name-based virtual hosts is
working as expected.
My questions concern other entries in httpd.conf and their effects.
1. Should I leave the old ServerName and Document Root statements in the
file? They seem to have no effect now.
2. What about the old Directory, OllowOverride, Order allow, deny, and
Allow from all entries? If I leave them in I get errors. Why?
3. What does the UserDir public_html do now?
4. What effect does 'UseCanonicalName On' have?
5. What controls do I have over .htaccess files in the directories now
pointed to by the VirtualHost entries?
6. Are there other issues I need to handle, using name-based virtual
hosts with one IP number?
Jay O'Brien
Rio Linda, California, USA
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Name-based virtual hosts questions
Posted by Jay O'Brien <ja...@att.net>.
Joshua, Thank you! I appreciate you helping me fight the learning curve,
which sometimes seems very steep (in my old age).
Some follow-up questions/responses are below.
Jay O'Brien
Rio Linda, California USA
Joshua Slive wrote:
> On Fri, 11 Mar 2005 18:42:50 -0800, Jay O'Brien <ja...@att.net> wrote:
>
>>1. Should I leave the old ServerName and Document Root statements in the
>> file? They seem to have no effect now.
>
>
> Yes, they do nothing, and yes, you should leave them.
>
So as long as a vhost is defined these do nothing. Is there a problem
with commenting them out?
>>2. What about the old Directory, OllowOverride, Order allow, deny, and
>> Allow from all entries? If I leave them in I get errors. Why?
>
>
> What errors? Directives outside <VirtualHost> sections still have an
> effect on the virtual hosts unless they are overriden by directives
> inside the <VirtualHost> sections.
>
I learned later that the error I got was because I renamed the old
directory when I established the vhost; Apache was complaining because
the directory didn't exist any more.
>
>>3. What does the UserDir public_html do now?
>
>
> The same thing it did before. Both vhosts will have user directory
> mapping, unless you change the config inside the vhost.
>
I obviously need to read up on this. But it sounds like if every one
of my directories and subdirectories has a default file (home.html in
my case) this doesn't apply to me NOW.
>
>>4. What effect does 'UseCanonicalName On' have?
>
> See:
> http://httpd.apache.org/docs-2.0/mod/core.html#usecanonicalname
> Essentially, it controls what name apache will use when it sends redirects.
>
Another issue I don't understand yet. But wow, thanks for turning me on
to the 2.0 file you linked for me. I'm running 1.3, and I haven't found
anything in the 1.3 docs pertaining to this issue that is that clearly
explained.
>
>>5. What controls do I have over .htaccess files in the directories now
>> pointed to by the VirtualHost entries?
>
>
> See:
> http://httpd.apache.org/docs-2.0/mod/core.html#allowoverride
>
Again, thanks for the link. I'll spend some time looking at 2.0 stuff now.
>
>>6. Are there other issues I need to handle, using name-based virtual
>> hosts with one IP number?
>
> I don't know what you are asking here.
>
I don't either, but I'm convinced that if there was a "gotcha" that you
would caution me about it.
>
> Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Name-based virtual hosts questions
Posted by Joshua Slive <js...@gmail.com>.
On Fri, 11 Mar 2005 18:42:50 -0800, Jay O'Brien <ja...@att.net> wrote:
> 1. Should I leave the old ServerName and Document Root statements in the
> file? They seem to have no effect now.
Yes, they do nothing, and yes, you should leave them.
> 2. What about the old Directory, OllowOverride, Order allow, deny, and
> Allow from all entries? If I leave them in I get errors. Why?
What errors? Directives outside <VirtualHost> sections still have an
effect on the virtual hosts unless they are overriden by directives
inside the <VirtualHost> sections.
>
> 3. What does the UserDir public_html do now?
The same thing it did before. Both vhosts will have user directory
mapping, unless you change the config inside the vhost.
>
> 4. What effect does 'UseCanonicalName On' have?
See:
http://httpd.apache.org/docs-2.0/mod/core.html#usecanonicalname
Essentially, it controls what name apache will use when it sends redirects.
>
> 5. What controls do I have over .htaccess files in the directories now
> pointed to by the VirtualHost entries?
See:
http://httpd.apache.org/docs-2.0/mod/core.html#allowoverride
>
> 6. Are there other issues I need to handle, using name-based virtual
> hosts with one IP number?
I don't know what you are asking here.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org