I can't run perl script in browser on ubuntu

This is my program

<form action="/cgi-bin/time.pl">
<input type="submit"/>
And my perl script "time.pl"
print "content-type:text/plain\n";
use CGI': standard';
print "$hr:$min:$sec";

Open in new window

If i run example.html in server it shows file not found
Priyanka RAsked:
Who is Participating?
David FavorConnect With a Mentor Linux/LXD/WordPress/Hosting SavantCommented:
First verify you can visit https://foo.com/time.pl to ensure your script executes outside an HTML page.

Refer to your /var/log/apache2/error.log or equivalent to debug.

Likely your ScriptAlias for CGI scripts requires some slight fix, which will show up clearly in error.log when you visit your script.
Henry LawCommented:
Wonder if the OP has fixed the problem?  If I understand EE's message display David commented (with good advice) nearly a week ago.
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Accepting my answer.

Poster has stopped posting.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.