*BSD News Article 97621


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!disgorge.news.demon.net!demon!dispatch.news.demon.net!demon!concerto.demon.co.uk!not-for-mail
From: ian@concerto.demon.co.uk (Ian Edwards)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: httpd configuration
Date: Thu, 12 Jun 1997 23:20:37 GMT
Message-ID: <866157637.8157.0.nnrp-3.c2dec490@news.demon.co.uk>
References: <5npq97$hmk@uwm.edu>
NNTP-Posting-Host: concerto.demon.co.uk
X-NNTP-Posting-Host: concerto.demon.co.uk [194.222.196.144]
MIME-Version: 1.0
X-Newsreader: knews 0.9.7
To: bacon@cs.uwm.edu (Jason Bacon)
Content-Type: text/plain; charset=us-ascii
Lines: 52
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:42811

In article <5npq97$hmk@uwm.edu>,
	bacon@cs.uwm.edu (Jason Bacon) writes:
> I'm looking for some documentation on configuring FreeBSD 2.1.7
> to allow local CGI programs to be run.
> 
> I did the basic setup in sysinstall, and it seems to be
> working fine, but when I try to run a CGI script, 
> (e.g. href="http://localhost/cgi-bin/whatever.cgi") I get
> "you don't have permission to access /cgi-bin/whatever.cgi on this server".
> 
> As a shot in the dark, I tried messing with the file and directory 
> permissions and ownership, and also running as root, but I always
> hit the same roadblock.
> 
> I'm new to this web server stuff (is it obvious?), so any pointers
> would be appreciated.  There doesn't seem to be any local documentation
> on the httpd daemon, unless I'm just looking in the wrong
> places.  ( Apropos'd everything I could think of, and looked
> through the handbook )
> 
> Thanks,
> 
> -Jason

(This assumes you are using 'apache')

The configuration files are in /usr/local/www/server/conf.

In access.conf there is a section :

<Directory /usr/local/www/cgi-bin>
AllowOverride None
Options ExecCGI
</Directory>

Change the directory name to the location of the CGI scripts.

In srm.conf :

ScriptAlias /cgi-bin/ /usr/local/www/cgi-bin/

Again, change /usr/local/.../ to the directory which has the CGI
scripts in (note the final '/').

Then with a script called 'fred' you can refer to it as

/cgi-bin/fred


-- 
Ian Edwards
ian@concerto.demon.co.uk