Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Originally posted by jacksmash Ok, I'm going to try this one more time. Nobody so far has been able to help unfortunately. I'm very new to Linux, however, I would like to set up my machine so I can run cgi-scripts, php etc. So one thing at a time. I'm trying to get cgi to run properly.
I installed RedHat 9.0. I'm assuming it has apache installed already. My question is:
how do I check if apache is configured properly??
I went to /etc/httpd/conf/httpd.conf and was able to look at the file. The ScriptAlias says /cgi-bin/ "/var/www/cgi-bin/"
I'm assuming this is correct.
But my browser just displays my source code when I try to run a perl program. For example:
print "Content-type: text/html \n\n";
print "This is a test";
Can anyone help me with this??? people have already directed my to lampp, and that is not the route I want to go. I really want to learn this stuff.
Appreciate any suggestions.
Did you make sure your cgi script in your cgi-bin is executable?
Something wrong with your config file then or missing something. Script works on my end but are you sure perl is located in /usr/local/bin and not just in /usr/bin ? That is usually the default location of perl.
i've actually tried running the script both ways - with the "/local" and without - simply because I can find Perl under both directories.
Maybe another problem is this:
when I run the file from my browser, do I just type in the path to it exactly the way it is? For example, /var/www/cgi-bin/test.pl is the path to my perl file.
I've read all the documentation I can find. I suggests that I might need to access it some other way (like via the server) but I am unsure of how to d this.
Sorry if I pissed you off about the 3 different threads. To me it was a matter of strategy and not a matter of "breaking the rules". You're right, I should have read the rules previously. I won't let it happen again.
In response to a question re. my httpd.conf file, I am posting some of it here. Please don't laugh if I've messed it up! I'm new at this!!
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
# for setting UNIX socket for communicating with cgid.
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
AddHandler cgi-script cgi pl
Allow from all
I added the "AddHandler" line. If I need to post more please let me know.
Originally posted by jacksmash I'm not sure which version I'm running! Whatever version that comes with RedHat 9.0 I guess. Is there any way I can do a check to see if it is even running? SOrry if that's a dumb question.
What does "afaik" mean??
AFAIK = As Far As I Know
Umm.. to find your version, just type this at a console or terminal as root:
Oh and easiest way to check and make sure its running would be: