While I was trying to allow some tool’s PHP file to perform the HTTP command PUT, the tool’s manual said to put the following code in the httpd.conf Apache configuration file:
Script PUT /some.php
And so I did. But when I tried to reload Apache’s configuration (/etc/init.d/apache2 reload), Apache complained with the following message:
Invalid command ‘Script’, perhaps misspelled or defined by a module not included in the server configuration
At this point in time, Google didn’t have any results for the error string, and this is why I am actually writing this blog entry.
Searching for Apache2’s directive Script got me to this Apache doc where you can see that the directive Script is part of the module mod_actions.
As already mentioned in the error message, a module was not included, now I knew that it would probably be the mod_actions module. Enabling the module by symlinking it from mods-enabled to mods-available made the error message disappear and everything working just fine:
ln -s /etc/apache2/mods-available/actions.load /etc/apache2/mods-enabled/actions.load
ln -s /etc/apache2/mods-available/actions.conf /etc/apache2/mods-enabled/actions.conf
Hope this helps to offer a quick solution for the error message.
Btw, while looking for fixes, I stumpled across this page, which offers further information about how to use Apache’s Script directive.