Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After a PCI scan identified guestbook.cgi as a risk, I want to disable the cgi-scripts installed by WHM (v11, running on CentOS5). I would like to do this "properly" using the WHM Web interface if possible (so this configuration survives an update and is easily reproduced).

Things I've tried so far that aren't satisfactory:

  1. chmod 0 /usr/local/cpanel/base/cgi-sys/guestbook.cgi

    chattr +i /usr/local/cpanel/base/cgi/guestbook.cgi

    = throws a 500 Internal Server Error when visiting and may interfere with automatic updates

  2. WHM | Packages | Feature Manager | Edit a Feature List

    Disabled CGI Center

    Disabled Email Scripts (cgiemail,formmail)

    Disabled Simple Guestbook

    Disabled Advanced Guestbook

    = no change when visiting (HTTP200 No Username given)

I've search, which are usually pretty good but I can't find an answer that doesn't have undesirable side effects.

share|improve this question

closed as off-topic by HopelessN00b Jan 14 '15 at 0:38

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 14 '15 at 0:38

To disable cPanel's "CGI Center" scripts via WHM for all accounts or a specific plan:

  1. After logging into WHM navigate to Packages > Feature Manager
  2. Select the feature list your plans are using under Edit a Feature List (to check edit the plan under Packages > Edit a Package)
  3. Uncheck CGI Center, click Save

To disable for a specific account (per cPanel), see

share|improve this answer
up vote 1 down vote accepted

I tried using WHM's 'Include Editor' (for httpd.conf edits that survive an update) but settled on using a .htaccess file in /usr/local/cpanel/cgi-sys/ instead. I'm sure there's a probably a better way to do it but this works for me:

# cat /usr/local/cpanel/cgi-sys/.htaccess
RewriteEngine On
RewriteRule ^guestbook.cgi$ [G,L]

# chattr +i /usr/local/cpanel/cgi-sys/.htaccess
share|improve this answer
if there's a proper way to do it I'd like to hear suggestions, please? – agtb Oct 18 '11 at 19:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.