l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 Feb 10 14:21

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] cgi-bin in user home dirs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

Hi All,

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 
I see "Hello There".

When placed in /home/ja/public_html/cgi-bin it does
not work.  When I key in 
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.

I've tried changing cgi to pl, which had no effect.

Have also messed with /etc/httpd/conf/httpd.conf 
without success.  That's not too surprising.  
I don't know what I'm doing.  But it didn't stop 
me from hacking away.

Google and tldp.org did not turn up anything that
helped.  Neither did an Apache book I have.

A detailed, simple tutorial would be nice.


# ---------- test.cgi
use strict;
use warnings;

use CGI qw(:standard);
use CGI::Carp qw/fatalsToBrowser/;

print header();
print start_html("Testing");

print h1("Hello There");
print end_html;

# ---------- permissions for test.cgi
# edited for readability
Script started on Mon Feb 10 10:25:51 2003

]0;ja@localhost:~[ja@localhost ja]$ ls -l
drwxr-sr-x    6 ja       apache       4096 Feb  7
16:23 public_html

]0;ja@localhost:~[ja@localhost ja]$ cd public_html/
public_html]$ ls -l
drwxr-sr-x    8 ja       apache       4096 Feb  7
11:33 cgi-bin

public_html]$ cd cgi-bin/
cgi-bin]$ ls -l test*
-rwxr-xr-x    1 ja       apache        190 Feb  9
17:27 test.cgi

Script done on Mon Feb 10 10:26:39 2003

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.