This is my program:
[root@localhost cgi-bin]# locate first.pl
/home/Ram/Desktop/work/first.pl
/usr/local/apache2/cgi-bin/first.pl
[root@localhost cgi-bin]# cd /usr/local/apache2/cgi-bin/
[root@localhost cgi-bin]# vi first.pl
#!/usr/bin/perl -w
use warnings;
use warnings;
use CGI;
print "content-type: text/html\n\n";
print "<h2>Hello, World!</h2>\n";
I am calling the script from my browser like this:
I didn't get output, but I'm getting an error:
Not Found
The requested URL /usr/local/apache2/cgi-bin/first.pl was not found on this server.
Apache/2.2.15 (CentOS) Server at localhost Port 80
I checked in web browser whether the Apache web server is working or not by using :
It us showing the welcome page.
How do I resolve this error?