PDA

View Full Version : CGI for Mutliple users.


Jaws
21st July 2004, 05:26 AM
Hi. Linux newbie here.

I just recently configured my apache server to work with multiple users. Well, a few of my users want a cgi-bin folder. The problem is, when I give them the CGI-BIN folder, any time they try to execute a .cgi or .pl file, it gives them "Internal Server Error 500". I checked my logs, and it simply says Premature end of script headers.

I have tried all of the following:
- Changing File permissions
- Setting file owners to 'apache'
- Setting file groups to 'apache'
- Editing httpd.conf

Any other things I can try?

In httpd.conf, I have this:
<Directory "/home/slash/public_html/cgi-bin/">
Options ExecCGI
SetHandler cgi-script
</Directory>

The reason I dont have /home/*/ is because I dont want all users to have CGI permissions, only ones that need it.

The above doesnt work :( And I tried ScriptAlias configuration also, no go.

Thanks in advance for any help! :)

mcelroyj
21st July 2004, 05:39 AM
Here is what I have for CGI execution in my httpd.conf:

<VirtualHost *>
<Location />
Options ExecCGI
</Location>
</VirtualHost>

I assume that you are using httpd 2.0.x

Jaws
21st July 2004, 05:48 AM

Here is what I have for CGI execution in my httpd.conf:

<VirtualHost *>
<Location />
Options ExecCGI
</Location>
</VirtualHost>

I assume that you are using httpd 2.0.x
Yes, Im using apache 2.0.49.

Will the commands you gave me above allow me to specify which users are allowed to use CGI and which arent?

Jaws
21st July 2004, 05:56 AM
I just tried the code above, and it didnt work. :( any other ideas?

mcelroyj
21st July 2004, 05:57 AM
You can set the Location directive to different directories, thus allowing directory by directory granularity.

e.g.

<Location /steve>
Option ExecCGI
</Location>
<Location /tim>
Option ExecCGI
</Location>

There might also be a module to configure the type of access you're looking for, I'm not 100% sure, though.

Jaws
21st July 2004, 05:59 AM
Ive tried the <Location> directive before. o.o; It didnt work. Has anyone here managed to successfully setup multiple users with cgi-bin access? If you have, I'd really love to have a look at your httpd.conf file. ;_;