You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Gary Manigault <ma...@dunncenter.org> on 2004/09/22 15:07:34 UTC
[users@httpd] Apache httpd.conf file
I have attached a segment of my httpd.conf file for some questions that
I have.
1. The NameVirtualHost section should it have my servers IP address in
it or a star or should it be commented out? What does the star in that
field mean.
2. I also have VirtualHost section at the bottom for a second website
on the same system. It that set correctly? Notice the Document Root
section. Is that overridden if there is another DocumentRoot defined in
the conf file? I am not getting the correct page. I get one of the
error pages.
Thanks.
=====
#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider"
redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
NameVirtualHost 192.168.1.50
#
# Allow server status reports, with the URL of
http://servername/server-status
# Change the ".your-domain.com" to match your domain to enable.
#
#<Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#</Location>
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".your-domain.com" to match your domain to enable.
#
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#</Location>
#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
#<IfModule mod_proxy.c>
#ProxyRequests On
#
#<Proxy *>
# Order deny,allow
# Deny from all
# Allow from .your-domain.com
#</Proxy>
#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via:
headers)
# Set to one of: Off | On | Full | Block
#
#ProxyVia On
#
# To enable the cache as well, edit and uncomment the following lines:
# (no cacheing without CacheRoot)
#
#CacheRoot "/etc/httpd/proxy"
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1
#NoCache a-domain.com another-domain.edu joes.garage-sale.com
#</IfModule>
# End of proxy directives.
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on
your
# machine you can setup VirtualHost containers for them. Most
configurations
# use only name-based virtual hosts so the server doesn't need to worry
about
# IP addresses. This is indicated by the asterisks in the directives
below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/
<http://httpd.apache.org/docs-2.0/vhosts/> >
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
#NameVirtualHost 192.168.1.50
#NameVirtualHost *
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
<VirtualHost sharkattack.homelinux.com>
ServerAdmin webmaster@gwshark.homelinux.com
DocumentRoot /var/www/gwshark
ServerName shark
</VirtualHost>
=====
Gary Manigault
Sr. Systems Analyst
765.983.8146
Re: [users@httpd] Apache httpd.conf file
Posted by Aman Raheja <ar...@techquotes.com>.
Gary Manigault wrote:
> I have attached a segment of my httpd.conf file for some questions
> that I have.
>
> 1. The NameVirtualHost section should it have my servers IP address
> in it or a star or should it be commented out? What does the star in
> that field mean.
The following doc explains very well what the how this works.
http://httpd.apache.org/docs-2.0/vhosts/name-based.html
Try changing
<VirtualHost sharkattack.homelinux.com>
to
<VirtualHost 192.168.1.50>
or put whatever IP is listening for that website.
HTH
Aman Raheja
> 2. I also have VirtualHost section at the bottom for a second
> website on the same system. It that set correctly? Notice the
> Document Root section. Is that overridden if there is another
> DocumentRoot defined in the conf file? I am not getting the correct
> page. I get one of the error pages.
>
> Thanks.
> =====
> <>
> #
> BrowserMatch "Microsoft Data Access Internet Publishing Provider"
> redirect-carefully
> BrowserMatch "^WebDrive" redirect-carefully
> NameVirtualHost 192.168.1.50 <>
> <VirtualHost sharkattack.homelinux.com>
> ServerAdmin webmaster@gwshark.homelinux.com
> <ma...@gwshark.homelinux.com>
> DocumentRoot /var/www/gwshark
> ServerName shark
> </VirtualHost>
> =====
---------------------------------------------------------------------
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