How to Disable default cPanel guestbook CGI script?

> Please login to your cPanel account

> Please search with the feature in the Find box at the top left side 

> Please leave default selected at the  Edit a Feature List drop-down list

> Please  un-check Simple Guestbook and then click on the Save button

> You will get the default feature list saved

> You can notice that the Simple GuestBook link is no longer available at the CGI Center in cPanel

> In order to disable the script from being accessible please  log into your server via SSH

> Please create a copy of your current Apache configuration with the below command

cp -frp /usr/local/apache/conf/httpd.conf{,.backup}

> Please edit  Apache configuration with your favorite text editor we are using vim to edit

vim /usr/local/apache/conf/httpd.conf

> Please go down to the  VirtualHosts section for your domain like below

<VirtualHost 123.123.123.123:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /home/dummydom/public_html
ServerAdmin [email protected]
## User dummydom # Needed for Cpanel::ApacheConf
<IfModule mod_suphp.c>
suPHP_UserGroup dummydom dummydom
</IfModule>
<IfModule !mod_disable_suexec.c>
<IfModule !mod_ruid2.c>
SuexecUserGroup dummydom dummydom
</IfModule>
</IfModule>
<IfModule mod_ruid2.c>
RUidGid dummydom dummydom
</IfModule>
CustomLog /usr/local/apache/domlogs/example.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
CustomLog /usr/local/apache/domlogs/example.com combined
ScriptAlias /cgi-bin/ /home/dummydom/public_html/cgi-bin/
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2/yourdom/example.com/*.conf"
</VirtualHost>

> You can uncomment the following line

# Include "/usr/local/apache/conf/userdata/std/2/dummydom/example.com/*.conf"
Include "/usr/local/apache/conf/userdata/std/2/dummydom/example.com/*.conf"

> Now you can save the file with command wq for write and quit

> Please create the Apache include directory with the below command

mkdir -p /usr/local/apache/conf/userdata/std/2/dummydom/example.com/

> You can echo the following value into a disable_cgisys.conf file inside that directory that we just created

echo "ScriptAlias /cgi-sys/ /home/dummydom/public_html/cgi-bin/" > /usr/local/apache/conf/userdata/std/2/dummydom/example.com/disable_cgisys.conf

> Please rebuild the Apache configuration so that the new include path is built-in with the below command

/scripts/rebuildhttpdconf

> You will have the response

Built /usr/local/apache/conf/httpd.conf OK

> Please restart Apache using the below command

service httpd restart

> In order to create a symbolic link to handle HTTPS requests as well in case you have an SSL certificate set up on your domain using the below command

ln -s /usr/local/apache/conf/userdata/std/2/dummydom/example.com/disable_cgisys.conf /usr/local/apache/conf/userdata/ssl/2/dummydom/example.com/disable_cgisys.conf

> You can try to view a guestbook page you’ll see it is no longer found

 

 

 

 

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Create a Thumbnail Image Using Thumbnailer in cPanel?

Please note The images that you want to create thumbnails must have uploaded to your cPanel...

How to Suspend or Unsuspend cPanel Accounts?

How to Suspend cPanel Accounts > Please sign in to your WHM account > Please choose...

How to Add Addon Domains in cPanel?

> Please log in to your cPanel account > Please go to Addon Domains under Domains  >...

How to modify an Addon Domain Document Root in cPanel?

> Please click on Addon Domains in cPanel. > Please double-click on the pencil-like icon...

How to remove an Addon Domain?

> Please click on the Addon Domains icon in cPanel > Please scroll down the page and find...

Powered by WHMCompleteSolution