Will I need to change the file extension from .pl to .cgi?
Main Topics
Browse All TopicsDear Experts,
Continuing on from here:
http://www.experts-exchang
I now have the code below. What do I have to do to this inorder to get the "Hello World" message to appear in a web browser?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Look at your httpd.conf file, and it'll have a DocumentRoot - this is the top-level for your webserver. Then you'll likely also have a ScriptAlias - this is your cgi-bin directory. Put your script in that directory.
To know if you need to change the extension, look for the AddHandler directive - whatever extension that specifies is the extension your script will need to have.
It doesn't seem to work when I point the browser to
http://localhost/cgi-bin/f
According to the httpd.conf file, the ScriptAlias is pointing to
/var/www/cgi-bin
This directory has the following permissions set
[root@localhost Server]# ls -l /var/www/
drwxr-xr-x 2 root root 4096 Nov 4 16:05 cgi-bin
The file in the /var/www/cgi-bin directory has the following permissions
[root@localhost Server]# ls -l /var/www/cgi-bin
-rwxr-xr-x 1 root root 108 Nov 4 16:05 first.cgi
What am I doing wrong?
The error message I get on the web browser is:
500 Internal Server Error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.3 (CentOS) Server at localhost Port 80
Follow-up question here:
http://www.experts-exchang
Follow-up question here:
http://www.experts-exchang
Business Accounts
Answer for Membership
by: kawasPosted on 2009-11-04 at 07:39:05ID: 25740387
nothing that code should work. place it in the cgi-bin directory, give it execute permissions, and away you go ... any errors should appear in the error log for apache.