Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Ive been looking around this site for days looking for anything remotely resembling this problem and have not had any luck.
Here is the problem. When I try to run my test script from the Browser (galeon and IE on a different computer) the browser wont execute it they try to download the script. (i.e. - typing "mysite.com/cgi-bin/first.cgi" the "DocumentRoot" is /mysite/ into the location in the browser) Which is not exactly I must say what I want. I have used "ScriptAlias" to make the cgi's able to run in my cgi-bin directory and used "AddHandler" to tell it to run scripts with .cgi and .pl extensions. I am using Apache 2.x. I cant seem to figure out why it is not running the script. Any Ideas? Anybody?
My cgi script first.pl (I even tried renaming it first.cgi - didnt matter still does same effect) -
My vhosts config file portion (IP's and Domains edited)-
#This is where we store the VirtualHosts configuration.
#Since Apache 1.3.19, we modified the setup to include some nice tricks:
#- We added the User and Group directives so VirtualHosts now work with
# suexec directive. If set, Apache will run all cgi scripts under that
# user and group (provided the uid and gid are > 100 for security). The
# directories and cgi files *must* belong to that user/group for the
# feature to work
#- We added the Setenv VLOG directive. This works in conjunction with
# the CustomLog in common.conf. When Setenv VLOG is set, apache will
# create a /var/log/httpd/VLOG-YYYY-MM-<ServerName>.log instead of logging
# to access_log. Use this instead of defining a special logfile for
# each vhost, otherwise you eat up file descriptors.
#- You can also specify a path for the VLOG for each Vhost, for example,
# to place the logs in each user's directory. However, if you want to
# use the file for accounting, place it in a directory owned by root,
# otherwise the user will be able to erase it.
#- I suggest only including the ErrorLog *only* if the vhost will use
# cgi scripts. Again, it saves file descriptors!
#- We added the Rewrite directives so vhosts will work with the
# PERLPROXIED configuration
check the apache logs, in the apache folder. I have this same problem, although I forgot about it with jsp and php, but the reason my logs gave were because there was some incorrect header or something. so maybe search around for bad header problems with apache and perl.
Thank you for your help techrolla. I figured out what it was though for those that would like to know or are having this particular problem. I had written (accidentally) an empty space between the start of the cgi and the "#/usr/bin/perl" statement... I deleted the empty space and viola! everything works as it is supposed to. Now on to making some real cgi's.