Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Where'd my Apache config util go?

Posted on 2000-04-25
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Accepted Solution

Reisu earned 140 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

721 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