apache users cgi's

ok lets re-open this for points again.

apache 1.1.1 allowed users to do their own cgi's
apache 1.3.3 apparently allowed it.
apache 1.3.9 is REALLY TICKING ME OFF!

Gandalf
No, cordless mouses will never catch on. The cord is the only thing keeping mine from hitting the wall when I throw it.
LVL 2
GP1628Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GP1628Author Commented:
I tried adding an individual user entry to allow cgi use in their own dir. With a .cgi I get an error in the error_log like

[Mon Dec 27 07:55:54 1999] [error] [client 63.199.8.154] Premature end of script headers:

The shell-script and the .pl  just displays its code to the screen.
But all of them work in the /home/httpd/cgi-bin

Gandalf
0
jayglateCommented:
First lets check a few things

1. there is a perl line at the top
#!/usr/local/bin/perl

2. Make sure the permissions are proper 755.

3.   Do you have suexec installed?  If yes, is the use and group directives in the virtual host configuration

4. is the .cgi uncommented in the httpd.conf

5. do you have the scriptalias configured.
0
GP1628Author Commented:
Did I mention that all the scripts seem to work fine in the /home/httpd/cgi-bin dir but not in the ~user/cgi-bin dir.
And since we copied it all from a machine wehre apache let everything work, to a new machine and newest version of redhat, I have made certain that all the paths, directorys, ownerships, and permissions are good matches.

             1. there is a perl line at the top
             #!/usr/local/bin/perl

Yes, well actually /usr/bin/perl since its RH6.1
But yes there is a line and it does match

             2. Make sure the permissions are proper 755.
Yes permissions are good

             3.   Do you have suexec installed?
Yes it seems to have done that automatically

             3a. If yes, is the use and group
             directives in the virtual host configuration

I dont follow this one. Can you give an example and which file it would be in?

             4. is the .cgi uncommented in the httpd.conf
I dont see anything for .cgi in this httpd.conf oher than the mod_cig.c module references. They are uncommented. Also the AddHandler for .cgi in the srm.conf file.

             5. do you have the scriptalias configured.
Apparently its configured ok for the main cgi-bin and I kinda figured it would be some specific entry to allow the same for users but I havent stumbled on it yet.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

jayglateCommented:
Seuxec is not installed automatically.  Stop and restart apache and check the error_log and if you see suexec it is installed. If you don't see it it is not.

 Apache 1.3.9 usualy keeps everyting in one file httpd.conf.  The migration might be causing trouble.  check the httpd.conf file to make sure it is set to recgonize the srm.conf and the access.conf files.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GP1628Author Commented:
[Mon Dec 27 12:32:05 1999] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

OK I seem to have that.

I see no mention or recognition of the srm.conf or access.conf in the httpd.conf file. Do you have an example of the "recognition" that you refer to?

Gandalf
0
monasCommented:
GP,

      what message(s) can you find in  error_log file about these errors?
0
Anju111599Commented:
gp:

To expand upon item 5 in jayglate's advice...

Modify /etc/httpd/conf/httpd.conf to add a <Directory> section for each of the user directories you wish to have as private cgi-bin directories, and set the scriptalias option within the <Directory> section.  Add any other directives needed in each.

The manual pages for the commands may be found at:

http://www.apache.org/docs-1.2/mod/core.html#directory

http://www.apache.org/docs-1.2/mod/mod_alias.html#scriptalias

Example:

<Directory /home/user1/cgi-bin>
ScriptAlias /cgi-bin/ /home/user1/cgi-bin/
</Directory>

<Directory /home/user2/cgi-bin>
ScriptAlias /cgi-bin/ /home/user2/cgi-bin/
</Directory>

If this works (and I believe it will -- I had the same problem a month ago) please assign points to jayglate for giving you excellent advice :)

Good Luck!

Anju
0
GP1628Author Commented:
actually it looks like we have just given up.
we loaded the earlier version of Apache and put all this off until next upgrade.

Thanks for all the answers though.

Gandalf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.