Enable CGI through .htaccess
To enable CGI through .htaccess
, perform the following steps:
- Log in to your server as the
root
user via SSH. - Change to the
/usr/local/apache/conf/
directory. - Create a backup of your
httpd.conf
file. For example:
Note: In this example, http-old.conf
represents the backup file’s name.
4. Open your http.conf
file with a text editor and locate the section of the file that resembles the following example:
1 2 3 4 | <Directory "/"> Options +ExecCGI +FollowSymLinks +Includes +IncludesNOEXEC +Indexes -MultiViews +SymLinksIfOwnerMatch AllowOverride None </Directory> |
- Change the
AllowOverride
line’s value fromNone
toAll
.
Your server now allows CGI scripts to run in all directories.