Article ID: 118352, created on Nov 1, 2013, last review on Jun 17, 2016

  • Applies to:
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux


  1. CGI scripts cannot be opened successfully.

  2. The location of the /cgi-bin folder is incorrect (webspace or www-root folder).


After updating from 10.x to 11.x, the location of the /cgi-bin directory could be incorrect (webspace or www-root).

By default, the location of the /cgi-bin folder in Plesk 10.x is located in the webspace root.

After upgrading, the Apache config ScriptAlias will be changed to the following:


However, the /cgi-bin folder will physically remain here:


... instead of in the correct location:


This behavior has been confirmed as an internal issue #PPPM-810 and completely fixed since Plesk 12.0.


It is recommended to upgrade to Plesk 12.0 and above.

If for some reason this is not possible, as a workaround, the ability to manage the cgi-bin folder location for the desired domain can be restore using steps below.

Note: Before applying the solution in this article, check that the domain does not have an application which was installed into the www-root directory /en/114518

  1. First, back up the Plesk database:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa > psa`date +%F_%H.%M`.sql
  2. Find the ID of the desired domain:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e"select id from domains where name = ''"
    | id |
    | 23 |
  3. Add this string to the psa.dom_param table:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e"insert into dom_param (dom_id, param, val) values (23,'cgi_bin_mode','www-root')"
  4. Regenerate the web server config for the domain:

    /usr/local/psa/admin/bin/httpdmng --reconfigure-domain domain.tld

After following these steps, the option "CGI support (cgi-bin directory is located in ...)" will appear in the domain hosting settings in the Plesk web interface: Websites and Domains -> Show Advanced Operations -> Website Scripting and Security -> CGI Support

Also, it will be able to choose between the old style (the root directory of the webspace) and the new one (the document root of this domain).


The root directory of webspace

A typical domain file organization in Plesk 11 is as follows:


Here, example domains are created under the webspace.

If location of /cgi-bin directory for a domain are being specified in the root directory of the webspace, its absolute path will be


The cgi_bin_mode parameter in the psa.dom_param table is set to 'webspace':

mysql> select * from dom_param where param='cgi_bin_mode' and dom_id=612;
| dom_id | param        | val      |
|    612 | cgi_bin_mode | webspace |
1 row in set (0.00 sec)

The document root of this domain

If that directory are being specified in the document root of this domain, its absolute path will be


mysql> select * from dom_param where param='cgi_bin_mode' and dom_id=581;
| dom_id | param        | val      |
|    581 | cgi_bin_mode | www-root |
1 row in set (0.00 sec)

The old-style root of this domain

If the old-style root directory are being specified (this option is only available after upgrading Plesk from a previou versions), the absolute path will be

`/var/www/vhosts/domain3.tld/cgi-bin `

This option provides compatibility with the obsoleted organization of domain files on the file system.

mysql> select * from dom_param where param='cgi_bin_mode' and dom_id=582;
| dom_id | param        | val      |
|    582 | cgi_bin_mode | old-style|
1 row in set (0.00 sec)

Search Words



cgi-bin folder location


cgi-bin directory server packet

sub domain cgi-bin

cgi-bin forbidden

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 01bc4c8cf5b7f01f815a7ada004154a2 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f aea4cd7bfd353ad7a1341a257ad4724a

Email subscription for changes to this article
Save as PDF