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

  1. Upload it to public_html/cgi-bin/.
  2. Start it with the path to the interpreter, for example #!/usr/bin/perl or #!/usr/bin/python3.
  3. Set its permissions to 755 (not 777, which is refused for security).
  4. Make sure it prints a header first, for example Content-Type: text/html followed 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.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Managed cPanel VPS

cPanel included; we handle updates, security and monitoring.

Server management

on-demand administration, hardening, migrations and monitoring.

Was this answer helpful?

Still stuck? Open a ticket