[vox-tech] cgi-bin in user home dirs

Ken Bloom vox-tech@lists.lugod.org
Tue, 11 Feb 2003 14:27:49 -0800


--9jxsPFA5p3P2qPhR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> ---ORIGINAL MESSAGE---=20
> Date: Mon, 10 Feb 2003 15:09:07 -0800 (PST)
> From: Jim Angstadt <jimajima9@yahoo.com>
> Subject: Re: [vox-tech] cgi-bin in user home dirs
> To: vox-tech@lists.lugod.org
> Reply-To: vox-tech@lists.lugod.org
>=20
>=20
> --- Tim Riley <timriley@timriley.net> wrote:
> > Jim Angstadt wrote:
> > > I'm trying to allow user accounts to have their own
> > > cgi-bin directory on a RH 7.2, apache box at my home.
> > >
> > > For testing, I have file test.cgi.
> > > (See below for file and permissions.)
> > >
> > > When the file is placed in /var/www/cgi-bin it works.
> > > Meaning, when I open a browser and key in
> > >    http://localhost/cgi-bin/test.cgi
> > > I see "Hello There".
> > >
> > > When placed in /home/ja/public_html/cgi-bin it does
> > > not work.  When I key in
> > >    http://localhost/~ja/cgi-bin/test.cgi
> > > I have gotten either of two responses
> > >    1. the script text
> > >    2. an error msg: "Forbidden You don't have
> > >    permission to access /~ja/cgi-bin/test.cgi
> > >    on this server.
> >=20
> > I've never done this, but based upon the Apache
> > configuration file syntax, this should be possible.
> > Note: this might be close but not exact.
> >=20
> > Edit httpd.conf (mine's in /etc/httpd/conf)
> > Got to the line that says: ScriptAlias /cgi-bin/
> > "/var/www/cgi-bin/"
> > Below it add a new line that says: ScriptAlias
> > /cgi-ja/
> > "/home/ja/cgi-bin/"
>=20
> Hi Tim,
>=20
> Thanks for the help.  I added both items to=20
> httpd.conf and then restarted httpd.  Then I=20
> keyed http://localhost/~ja/cgi-ja/test.cgi into
> the browser location bar and got a "Not Found"=20
> response.
>=20
> Thinking the cgi-bin dir should be directly=20
> under /home/ja, I moved it there, restarted=20
> httpt, and got the same "Not Found" msg.
>=20
> Then I changed the Options line of the new block
> to read: Options none ExecCGI
> and restarted httpd.  Nope.
>=20
> Likewise for just: Options ExecCGI
>=20
> It's gotta be something simple I'm missing.

Tim wasn't quite sure what he was trying to do, and he said that. He=20
gave you instructions to access http://localhost/cgi-ja/ as a cgi-bin=20
directory. You are trying to access http://localhost/~ja/cgi-bin/

Now I'm also shooting in the dark here (I don't use Apache, but I looked=20
through the documentation to see what the solution might be. I suggest=20
you check out my suggestion in the documentation yourself.) but it looks=20
like the solution is to say something along the lines of

<Directory /home/*/cgi-bin/>
	Options ExecCGI
</Directory>

CHECK THIS OUT IN THE DOCUMENTATION BEFORE YOU DO IT. I KNOW NOTHING=20
ABOUT APACHE AND CANNOT BE SURE THAT THIS WILL WORK. Specifically, I'm=20
not entirely certain that the Options line is correct.

--=20
PGP/GPG Fingerprint: D5E2 8839 6ED3 3305 805C  941F 9476 A9BD E2B2 CAD1
Import with `gpg --keyserver pgp.mit.edu --recv-key E2B2CAD1`
Also on www: http://wwwcsif.cs.ucdavis.edu/~bloom/kabloom.asc
For more information about PGP and GPG, see http://www.gnupg.org/

--9jxsPFA5p3P2qPhR
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE+SXjllHapveKyytERAmqBAKCbEq06ehtJRHCo7hCrZzuGljkKNwCfdeMC
IooBHLjL+dWsmhhx+Y5YbuM=
=QhKj
-----END PGP SIGNATURE-----

--9jxsPFA5p3P2qPhR--