• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Cannot put cgi-bin outside httpdocs

tinker

New Pleskian
Moving sites from other servers into a Plesk 12 environment (Centos 6.5) I cannot see a way to set cgi-bin in the webspace root directory instead of document root (httpdocs). In previous Plesk CGI support allowed selection of cgi-bin location.

I have tried (to no avail):
Code:
/usr/local/psa/bin/domain -u mydomain.tld -cgi-mode www-root
/usr/local/psa/admin/bin/httpdmng --reconfigure-domain mydomain.tld

Code:
mysql> SELECT * FROM dom_param WHERE dom_id=x;
(where x is the dom_id of my domain) shows the cgi_bin_mode param has val www-root but no change to system/<domain>/httpd.conf.

Relocating cgi-bin to httpdocs/cgi-bin is not an option - some of these sites are development environments where I cannot move cgi-bin on the live environment and some of the scripts use relative paths.

Is this no longer possible in Plesk 12?


EDIT: The following works (oops):
Code:
/usr/local/psa/bin/domain -u mydomain.tld -cgi-mode webspace
/usr/local/psa/admin/bin/httpdmng --reconfigure-domain mydomain.tld
mkdir /var/www/vhosts/mydomain.tld/cgi-bin
chown myuser:psaserv /var/www/vhosts/mydomain.tld/cgi-bin
 
Last edited:
Yes, cgi-bin is created in httpdocs directory by default in latest Plesk versions. It is not possible change it through Plesk UI.
 
Yes, cgi-bin is created in httpdocs directory by default in latest Plesk versions. It is not possible change it through Plesk UI.
Thanks Igor. Is my solution likely to cause me problems? For instance will Plesk re-arrange cgi-bin on reboot or upgrade?
 
Not sure, but perhaps /usr/local/psa/admin/bin/httpdmng --reconfigure-all may break your customization.
 
Back
Top