[How to] Enable cgi-scripts to run from different directories?

Created:

2016-11-16 12:54:07 UTC

Modified:

2017-06-04 22:11:32 UTC

1

Was this article helpful?


Have more questions?

Submit a request

[How to] Enable cgi-scripts to run from different directories?

Applicable to:

  • Plesk for Linux

Question

How to enable cgi-scripts to run from any directory?

Answer

By default, CGI scripts are being ran from the /var/www/vhosts/example.com/httpdocs/cgi-bin/ folder only.

To allow CGI scripts to be processed from any folder:

  1. Uncomment the cgi-script AddHandler directive in the main Apache configuration file, /etc/httpd/conf/httpd.conf :

    AddHandler cgi-script .cgi
  2. Restart Apache.

    # service httpd restart
Have more questions? Submit a request
Please sign in to leave a comment.