Where'd my Apache config util go?

Posted on 2000-04-25
Last Modified: 2013-12-06

Ok this is the Linux-knownothing again, but oh well :) I used to have RedHat 5.2 installed, and it had a menu item or so somewhere for Apache configuration... but now I formatted my pc and installed RedHat 6.1 and that Apache config thingy seems to have disappeared.
I think I need this, cause I wrote (well, copy&pasted) a CGI script thingy, placed it in the /home/httpd/cgi-bin directory and I tried accessing it from another (Windoze) computer... which gave me an internal server error... so I think that cgi is somehow turned off or something....
Ok and if this is as wrong as can be, don't laugh :)
Question by:mgdPaul
  • 3
  • 2

Accepted Solution

Reisu earned 35 total points
ID: 2750294
If you've used a default Red Hat installation, the config file for the Apache web server is located in /etc/httpd/conf. The file itself is called httpd.conf.

This file needs to be modified for it to function properly...details such as file location for script, web, and logging.

A few things of note here: First off, an internal server error can be one of various things. First off, the script you have uploaded has improper permissions (ie, it cannot be executed by the's read only, instead of read and execute, at least). Secondly, if uploaded improperly, the file may have become corrupted (ie, uploading a perl script in binary will leave lots of ugly ^M characters trailing). Lastly, the server is not configured correctly.

Make sure the server is running (ps aux | grep http). If it is, try viewing the httpd logs. Again, assuming this is a default RH install, the web logs would more than likely be in /var/log/httpd. You'd want to view both the access_log and error_log files. They will give you more detail as to what the precise error may be.


Author Comment

ID: 2750313
Thanks!!!! :)

I did what you said, first used "ps aux | grep httpd" (whatever the hell that may do) and everything seemed fine, then checked the error log, and whaddayaknow, permission denied on my file :)
I'm a Windoze (98) guy, I'm not used to permissions and all that.... oops :)

And yes I used more or less the default installation, I selected what packages I wanted and which ones I didn't want, but I don't even dare touching the paths and all.... I can't even do simple things on Linux let alone do more advanced things :)

Btw what happened to this nice little Apache config util? Was a program which started out with a dialog with 2 buttons or so on it and an indian pic or so.... and there you could choose to config the thing... what happened to that? lol that was my only way of understanding a bit of it :)

Author Comment

ID: 2750341
dammit I seem to be doing something else wrong, but what?

My script thingy is (i did not write it, copy&pasted it from a book):

echo Content-type: text/html

if [ -x $FINGER ]; then
    if [ $* = 0 ]; then
        cat << EOM
<TITLE>Finger Gateway</TITLE>
<H1>Finger Gateway</H1>


This is a gateway to "finger". Type a user@host combination in your browser's search dialog.<P>
        echo \<PRE\>
        $FINGER "$*"
    echo Cannot find finger on this system.

When I try to open it on a different machine than the Linux machine itself I get an internal server error (I use "") and when I open it in Netscape on the Linux machine itself I see a search dialog thingy that is generated by the <ISINDEX> tag, but I also see the rest of the script on the page.... I have no idea why..... do I need some kind of CGI-translator or engine or whatever?

Expert Comment

ID: 2752885
Best guess is a few things:

First off, you're missing (at least in the post) the basic header that would start any script. This would be:


Since this is calling a shell process (ie, finger), you'll need this.

Secondly, if you've 'copied and pasted', you may have some trailing spaces left at the end of each line. Since each line is a statement or command, you need to make sure that the command is in fact .ended., and that you don't have any 'empty space' left after each line.

For example, pretend * denotes a space. If you list a statement/command like this:
FINGER=/usr/bin/finger, there may be empty whitespace at the end of the it will actually be FINGER=/usr/bin/finger** (remember, ** in this instance I'm using to denote whitespace).

Copy and paste generally won't work when you're dealing with scripts, because you often leave trailing spaces at the end of each line. FWIW, I'd suggest double-checking, or manually typing it out. And dont, most importantly, forget the #!/bin/sh at the beginning =:)


Author Comment

ID: 2752953
Thanks :)
Seems that #!/bin/sh did the trick.... when I open it locally (on my Linux machine) in Netscape it redisplays the entire script,but oh well... and when I open it on a remote computer it shows what the script's supposed to do :) Woo hoo :)
And with 'copy&pasted' I meant I typed it over exactly from the book, not actual copy&pasting.... I wouldn't even know how to do that on Linux :)

I really should buy a book on Linux someday and learn it, since it all seems mighty interesting but I really understand jack **** of it :)

Thanks a lot :)

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System ( introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question