Forum Moderators: phranque
So I decided to try to be smart. I want to selectively enable CGI per each vhost or directory, but in an easy way.
So I thought, globally, I'd do this:
ScriptAlias /usr-bin/php5-cgi /usr/bin/php5-cgi
AddType application/x-httpd-php .php
Action application/x-httpd-php /usr-bin/php5-cgi
...
<Directory />
Options ... -ExecCGI
</Directory>
Then, in every vhost/directory, I could simply do:
Options +ExecCGI
and it would work. Wrong!
I want CGI to be disabled by default, but it's not. My instance of squirrelmail, for example, still works when it shouldn't be!
There are no .htaccess files anywhere doing funny things, I checked (for this vhost anyway)
How can I make sure CGI is only enabled explicitly when I want it like I am trying to?
Thanks.
AddType application/x-httpd-php .php
Then, in every vhost/directory, I could simply do:Options +ExecCGI
To activate PHP in every vhost/directory, you could simply do
AddHandler application/x-httpd-php .php See RemoveHandler if you'd like to remove a previous AddHandler.