GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 26-Jan-2004, 23:47
tonyk tonyk is offline
New Member
 
Join Date: Jan 2004
Posts: 1
tonyk is on a distinguished road

httpd.conf configuration


Hi, I stumbled across this forum from a google search.

If I have PHP enabled on a directory (/home/apache/htdocs/), how do I make it so that everything under a certain directory will not run PHP files (/home/apache/htdocs/userfiles/)?

Reason that I ask, is that I am going to offer some hosting and don't want them to have the access to run PHP files.
  #2  
Old 27-Jan-2004, 01:23
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
If you setup a virtual host or directory setting you can put one of the lines there to disable the PHP engine:
Code:
php_admin_value engine 0 OR php_admin_flag engine off
I've never setup something like that myself, but something I think something like this should work
Code:
<Directory /home/apache/htdocs/userfiles> php_admin_value engine 0 </Directory>

I should note that you should put the 'engine' flag in every <VirtualHost> section.
There are a lot of bugs with this. setting the engine flag for every virtual host seems to solve those problems
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #3  
Old 27-Jan-2004, 03:31
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello Tonyk,

Here's something else you can try... add this in the httpd.conf file where appropriate i.e. for the directory /home/apache/htdocs/userfiles/:

Code:
# if your default is # AddType application/x-httpd-php .php .phtml, then.. RemoveType application/x-httpd-php .php .phtml
 
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
reading a .txt bengaltgrs CPP / C++ Forum 8 21-Jan-2004 09:04
total newbie need help grunt123 Apache Web Server Forum 2 04-Dec-2003 11:14
Problem with .htaccess Zergus Apache Web Server Forum 7 29-Jul-2003 11:01
PHP/mySQL backend configuration help needed jrobbio Web Design Forum 2 17-Apr-2003 10:07

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 23:38.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.