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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Install MySQL 5.6 and PHP on Centos Linux 6 99
Access_log 17 99
Printing to old printer through Linux (CUPS) Print Server? 7 46
.php tree directory? 5 55
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

912 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now