Re: Limit PHP to a <directory>?
| From: | Jerry | Date: | Mon, 03 Jul 2000 16:14:20 +0000 |
| Subject: | Re: Limit PHP to a <directory>? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4518@lists.php.net to get a copy of this message | ||
In article <009d01bfe4fe$a2633520$081b0497@oneonline.it>,
frank@oneonline.it ("Francesco Amelio") wrote:
> What is the directive to use in apache conf file to limit PHP execution
> to a
> single <directory>?
Something like this might do it for the CGI version:
ScriptAlias /unpublic/ /usr/local/apache/share/unpublic/
<directory /www/htdocs/theplacetousephp/>
Action php3-script /unpublic/php
AddHandler php3-script .phtml
DirectoryIndex index.phtml index.cgi index.shtml index.html
</directory>
And then make sure you remove any other handlers that deal with php. If
you are doing it as a module, you probably would do it more like:
<directory /www/htdocs/theplacetousephp/>
AddType application/x-httpd-php3 .phtml
DirectoryIndex index.phtml index.cgi index.shtml index.html
</directory>
Jerry