Click to See Complete Forum and Search --> : Help with httpd.conf


Voelcker
07-24-2002, 08:06 AM
I'm using RH 7.3, trying to configure Apache. The default site works OK (/var/www/html). User created sites work OK (http://servername/~user) But when I try to run a CGI script in the user's site, it just shows the text of the script instead of running it. I set the permission to 755. The same script works when placed in the cgi-bin of the default site, but not the user's site.

I know that this has to do with httpd.conf since I've spent some time trying to resolve this. My problem is my httpd.conf file is empty. Does this have anything to do with the fact that I've been using Red Hat's GUI apache configuration tool. I would have guessed that it made the necesary changes to httpd.conf, but each time a look at it, it remains empty.

Any help will be appreciated.

pvera
07-24-2002, 08:38 AM
Look in httpd.conf where it assigns the alias for the cgi-bin folder. It also sets specific permissions for that folder. You need to create a rule just like that for the other folders that you want them to have CGI access.

If your httpd.conf is blank, do a search for the sample file that shipped with it. If you don't find that one you can either extract it from the install package or get it from apache.org.

mingshun
07-24-2002, 10:53 PM
Originally posted by Voelcker

I know that this has to do with httpd.conf since I've spent some time trying to resolve this. My problem is my httpd.conf file is empty. Does this have anything to do with the fact that I've been using Red Hat's GUI apache configuration tool. I would have guessed that it made the necesary changes to httpd.conf, but each time a look at it, it remains empty.

Any help will be appreciated.

As far as I know, if you use that apache configuration tool, don't
use hand editing. The same goes for vice versa. Or you mean
when you use the tool to load httpd.conf, it is empty too?

Voelcker
07-24-2002, 10:58 PM
Yes, even after I set config setting in the GUI Config utility, the httpd.conf file still remains empty.

I have good reason to believe that I'm not doing somthing right since the default site (the one telling you Apache is working) works OK.
:confused:

Snakeman
07-24-2002, 11:20 PM
Just an idiot-check...

Does the CGI script have the #!/usr/bin/foo line?
If it does, do you have /usr/bin/foo set up?

You've probably got this covered already but I just thought it might help to look for trouble in less complex areas... it happens too often that a seemingly complex problem is due to a missing bracket or a loose ether cable :-p