CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: How to Perl CGI script in apache web sever: Edit Log



rammohan
Novice

Feb 25, 2014, 5:17 AM


Views: 3154
How to Perl CGI script in apache web sever

I'm learning Perl . Currently I'm learning Perl CGI script,in this script i wrote one sample hello world program

Code
    #!/usr/bin/perl -w 
# hello.pl -- my first perl script!
print "Content-type: text/html\n\n";
print "Hello, world!\n";

I saved above script in /usr/local/apache2/cgi-bin/hello.pl
For this I installed apache web server in my machine, I checked this web server by using http://localhost it works fine. Then i run my hello.pl program in my browser by using apache server

http://localhost/cgi-bin/hello.pl

but above url showing error.

Code
    Not Found 

The requested URL /cgi-bin/hello.pl was not found on this server.

Apache/2.2.15 (CentOS) Server at localhost Port 80


why it showing this. Is there any thing wong in script or in apache? Did any one face this problem? Please let me know,try to resolve this problem

Code
I also attached httpd.conf file



(This post was edited by rammohan on Feb 25, 2014, 9:12 PM)
Attachments: httpd.conf (13.3 KB)


Edit Log:
Post edited by rammohan (Novice) on Feb 25, 2014, 9:12 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives