httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Burden" <...@Burden.ca>
Subject Re: [users@httpd] Restrict php execution only to some web directories
Date Wed, 17 Nov 2004 10:14:05 GMT
You probably just need to make the default for all directories being php
off.

something like
<Directory "/usr/local/etc2/httpd/htdocs/">
php_admin_flag engine off
</Directory>
<Directory "/usr/local/etc2/httpd/htdocs/php_prueba">
php_admin_flag engine on
</Directory>

----- Original Message ----- 
From: "Imanol Apaolaza Sanz" <iapaolaza@unav.es>
To: <users@httpd.apache.org>
Sent: Wednesday, November 17, 2004 2:53 AM
Subject: [users@httpd] Restrict php execution only to some web directories


> Hello,
>
>     I am trying to restrict execution of php scripts to some web
> directories only, leaving the rest of web directories without php
> support. If I use (f.e):
>
> <Directory "/usr/local/etc2/httpd/htdocs/php_prueba">
>    Options Indexes FollowSymLinks
>    AllowOverride None
>    Order allow,deny
>    Allow from all
>     AddType application/x-httpd-php .php .phtml
> </Directory>
>
> deleting AddType application/x-httpd-php .php .phtml line from global
> parameters y can execute php script only in this directory, but if
> someone use an .htaccess with this content:
>
>     AddType application/x-httpd-php .php .phtml
>
> in other directory, the php ejecution works there too.
>
> Is possible to restrict php execution only to some directories?
>
> Regards,
> Imanol Apaolaza Sanz
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message