Hi,
I have installed apache webserver in ubuntu and created example.pl in /usr/lib/cgi-bin.
I have also add below code to etc/apache2/sites-enabled/000-default.conf file
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory “/usr/lib/cgi-bin”> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory>
From /usr/lib/cgi-bin when I execute ./example.pl I’m getting output, but when i tried to load perl script from browser using
localhost/cgi-bin/example.pl i’m getting below error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log. Apache/2.4.7 (Ubuntu) Server at localhost Port 80
Please help me in resolving this issue, i know it is simple but i don’t what to do to fix it
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The first thing to do when trying to resolve a problem like this is to check the error log, as recommended by the error message. It’s a whole lot easier to solve a problem when you know what the problem is.
That said, the first thing that comes to mind is a permissions error - the permissions on the script may allow your user to execute the script directly, but will not allow the server’s user to execute the script.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.