Updated: 28 September 2026 · Applies to: Perl 5 on cPanel & WHM 138 (Jupiter theme)
CGI scripts (for example in Perl or Python) can run from the cgi-bin folder inside public_html, and from other folders when they use a recognised extension such as .cgi or .pl.
To make a CGI script work
- Upload it to
public_html/cgi-bin/. - Start it with the path to the interpreter, for example
#!/usr/bin/perlor#!/usr/bin/python3. - Set its permissions to
755(not 777, which is refused for security). - Make sure it prints a header first, for example
Content-Type: text/htmlfollowed by a blank line.
Open it at https://yourdomain.com/cgi-bin/script.pl. If you get a 500 error, check Metrics › Errors in cPanel for the reason.