Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache config cgi Problems

Status
Not open for further replies.

jsawyer

MIS
Jan 1, 2003
5
0
0
US
I think I must have some problem in my configuration file. When I try to go to I get page 403 forbidden. I get this error in my error_log

"[Wed Jan 22 08:29:19 2003] [error] [client 10.10.1.10] client denied by serverconfiguration: /var/
Here is my commonhttpd.conf file
any help I could get on this would be great
##################################
# MetaDir: specifies the name of the directory in which Apache can find
# meta information files. These files contain additional HTTP headers
# to include when sending the document
#
#MetaDir .web

#
# MetaSuffix: specifies the file name suffix for the file containing the
# meta information.
#
#MetaSuffix .meta

#
# Customizable error response (Apache style)
# these come in three flavors
#
# 1) plain text
#ErrorDocument 500 "The server made a boo boo.
# n.b. the single leading (") marks it as text, it does not get output
#
# 2) local redirects
#ErrorDocument 404 /missing.html
# to redirect to local URL /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
# N.B.: You can redirect to a script or a document using server-side-includes.
#
# 3) external redirects
#ErrorDocument 402 # N.B.: Many of the environment variables associated with the original
# request will *not* be available to such a script.

<Location /manual>
Options Multiviews
ErrorDocument 404 &quot;The document you requested has not been installed on your sys
tem. Please install the apache-manual package.
</Location>


#
# Customize behaviour based on the browser
#
<IfModule mod_setenvif.c>

#
# The following directives modify normal HTTP response behavior.
# The first directive disables keepalive for Netscape 2.x and browsers that
# spoof it. There are known problems with these browser implementations.
# The second directive is for Microsoft Internet Explorer 4.0b2
# which has a broken HTTP/1.1 implementation and does not properly
# support keepalive when it is used on 301 or 302 (redirect) responses.
#
BrowserMatch &quot;Mozilla/2&quot; nokeepalive
BrowserMatch &quot;MSIE 4\.0b2;&quot; nokeepalive downgrade-1.0 force-response-1.0

#
# The following directive disables HTTP/1.1 responses to browsers which
# are in violation of the HTTP/1.0 spec by not being able to grok a
# basic 1.1 response.
#
BrowserMatch &quot;RealPlayer 4\.0&quot; force-response-1.0
BrowserMatch &quot;Java/1\.0&quot; force-response-1.0
BrowserMatch &quot;JDK/1\.0&quot; force-response-1.0

</IfModule>
# End of browser customization directives

#
# Allow server status reports, with the URL of # Change the &quot;.your_domain.com&quot; to match your domain to enable.
#
<IfModule mod_status.c>
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
allow from 127.0.0.1
#Allow from .your_domain.com
</Location>
#
# ExtendedStatus controls whether Apache will generate &quot;full&quot; status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the &quot;server-status&quot; handler is called. The default is Off.
#
#ExtendedStatus On
</IfModule>

#
# Allow remote server configuration reports, with the URL of
# (requires that mod_info.c be loaded).
# Change the &quot;.your_domain.com&quot; to match your domain to enable.
#
<IfModule mod_info.c>
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from .your_domain.com
</Location>
</IfModule>

<IfModule mod_perl.c>
<Location /perl-status>
SetHandler perl-script
PerlHandler Apache::Status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
</IfModule>

#
# There have been reports of people trying to abuse an old bug from pre-1.1
# days. This bug involved a CGI script distributed as a part of Apache.
# By uncommenting these lines you can redirect these attacks to a logging
# script on phf.apache.org. Or, you can record them yourself, using the script
# support/phf_abuse_log.cgi.
#
#<Location /cgi-bin/phf*>
# Deny from all
# ErrorDocument 403 #</Location>

#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
#<IfModule mod_proxy.c>
# ProxyRequests On

# <Directory proxy:*>
# Order deny,allow
# Deny from all
# Allow from .your_domain.com
# </Directory>

#
# Enable/disable the handling of HTTP/1.1 &quot;Via:&quot; headers.
# (&quot;Full&quot; adds the server version; &quot;Block&quot; 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 /var/cache/httpd
# 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.

<IfModule mod_dav.c>
# DavLockDB /var/lock/DAVLock
</IfModule>

<IfModule mod_include.c>
# XBitHack on
</IfModule>


#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory /var/
#
# This may also be &quot;None&quot;, &quot;All&quot;, or any combination of &quot;Indexes&quot;,
# &quot;Includes&quot;, &quot;FollowSymLinks&quot;, &quot;ExecCGI&quot;, or &quot;MultiViews&quot;.
#
# Note that &quot;MultiViews&quot; must be named *explicitly* --- &quot;Options All&quot;
# doesn't give it to you.
#
Options -Indexes FollowSymLinks MultiViews

#
# This controls which options the .htaccess files in directories can
# override. Can also be &quot;All&quot;, or any combination of &quot;Options&quot;, &quot;FileInfo&quot;,
# &quot;AuthConfig&quot;, and &quot;Limit&quot;
#
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>

<Directory /var/ AllowOverride All
Options -Indexes FollowSymLinks MultiViews ExecCGI
Order allow,deny
Allow from all
</Directory>

<Directory /var/ AllowOverride All
Options ExecCGI
</Directory>

<Directory /var/ AllowOverride None
Options ExecCGI
Order deny,allow
Deny from all
Allow from all
#allow from .your_domain.com
</Directory>

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#<Directory /home/*/public_html>
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
#</Directory>

# These settings are pretty flexible, and allow for Frontpage and XSSI
<Directory /home/*/public_html>
AllowOverride All
Options MultiViews -Indexes Includes FollowSymLinks
Order allow,deny
Allow from all
</Directory>

<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
</Directory>


<IfModule mod_perl.c>
<Directory /home/*/public_html/perl>
SetHandler perl-script
PerlHandler Apache::perlRun
Options -Indexes ExecCGI
PerlSendHeader On
</Directory>
</IfModule>

<Directory /var/ Options -Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Directory /usr/share/doc>
Options Indexes FollowSymLinks
Order deny,allow
Deny from all
Allow from 127.0.0.1
#allow from .your_domain.com
</Directory>

<Directory /var/ Options Indexes FollowSymLinks
</Directory>

<Location /index.shtml>
Options +Includes
</Location>

<IfModule mod_perl.c>
PerlModule Apache::Registry

#set Apache::Registry Mode for /perl Alias
<Location /perl/*.pl>
SetHandler perl-script
PerlHandler Apache::Registry
Options -Indexes ExecCGI
PerlSendHeader On
</Location>

#set Apache::perlRun Mode for /cgi-perl Alias
<Location /cgi-perl/*.pl>
SetHandler perl-script
PerlHandler Apache::perlRun
Options -Indexes ExecCGI
PerlSendHeader On
</Location>
</IfModule>

[root@vetty conf]#
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top