Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old March 16th, 2001, 05:24 AM
Bjarte Bjarte is offline
few things are impossible
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Location: Bergen, Norway
Posts: 6 Bjarte User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

What is the recommended procedure to allow/disallow PHP files to run in certain directories?

I have successfully implemented this like this in httpd.conf:

# PHP not allowed by default
<Files *.php>
order allow, deny
deny from all
</Files>

# PHP allowed in /php
<Directory /home/httpd/html/php>
<Files *.php>
order allow, deny
allow from all
</Files>
</Directory>

Are there other ways of doing this? Or should I be happy with my solution?

-Bjarte-

[Edited by Bjarte on 03-16-2001 at 04:36 AM]

Reply With Quote
  #2  
Old March 16th, 2001, 05:38 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> should I be happy with my solution?

Yes. You may also want to change it to:

<FilesMatch "\.php$">
order deny, allow
deny from all
</FilesMatch>

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Allow PHP based on directories


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway