LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-28-2004, 12:39 AM   #1
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Rep: Reputation: 30
php option for apache


Hey All, can someone tell me how to only allow regular html and disable php for a certain directory on my webserver. (v-hosting)

Thank you

I have done some searches, cant find much
 
Old 08-28-2004, 04:59 AM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
hmmm...this questions seems odd to me. You only want .html files server in a certain directory. If you don't want php files served in that directory then wouldn't the easiest thing to do be not have any php files in that directory?

You probably have a more complex situation here so could you ellaborate please?
 
Old 08-28-2004, 02:46 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Somewhere in your httpd.conf you have PHP set up as an application (with an "AddType Application ..." configuration entry. I've never actually done this, but it seems logical that the RemoveType directive for the virtual host you want to disable PHP on should do the trick -- see the Apache manual on RemoveType. Actually, in the environment I work on, we put the AddType directive into all the virtual host configs separately, and we would just leave it out of any vhost which we did not want to have PHP'.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 10:25 AM
Recompiling php with gdbm option DGath Linux - Software 1 11-30-2005 04:02 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
php mcrypt shared configuration option Pete Dogg Linux - Software 1 02-22-2004 12:00 PM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration