LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 02-07-2006, 08:51 AM   #1
DaveVT5
LQ Newbie
 
Registered: Dec 2005
Location: Blacksburg, VA
Distribution: Fedora Core 4
Posts: 12

Rep: Reputation: 0
Question Turn off (disable) PHP for some virtual hosts in Apache


I currently host a number of web sites on a Fedora Core 4, Apache 2 box. I have PHP 5 installed. I'm happy to say that everything is running beautifully. I switched the last of my sites over from a Windows box this weekend. No more Windows!

I have a question regarding PHP in Apache. Is there an way to turn on/off PHP for various virtual hosts in Apache similar to how you can enable/disable Perl/CGI? I have searched but I haven't found what I need.

Any help would be greatly appreciated.
 
Old 02-07-2006, 09:41 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
You can create a .htaccess file in the DocumentRoot of your VirtualHost with this line:
Code:
php_flag engine off
and add or edit the following inside the <VirtualHost...></VirtualHost>
Code:
AllowOveride All
 
Old 03-02-2006, 04:51 PM   #3
DaveVT5
LQ Newbie
 
Registered: Dec 2005
Location: Blacksburg, VA
Distribution: Fedora Core 4
Posts: 12

Original Poster
Rep: Reputation: 0
I apologize for the time-elapse. Thanks for the reply. For my setup I did not want to add the code to disable PHP in .htaccess because I wouldn't want any over-achievers to re-enable it.

I already had the line AllowOverride All turned on in my virtual hosts files but by adding

Code:
php_value engine off
anywhere in the <VirtualHost></VirtualHost> did indeed disable PHP.

Last edited by DaveVT5; 03-02-2006 at 05:48 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 07:29 AM
PHP include() file paths in Apache virtual hosts tawalker Linux - Software 0 09-23-2004 03:16 PM
Apache 2 Suexec PHP and Virtual Hosts codedv Linux - Software 2 02-26-2004 05:56 PM
Virtual Hosts with Apache noripcord7 Linux - Games 1 02-22-2004 11:33 PM
Apache Virtual Hosts quozt Linux - General 3 10-15-2003 10:51 AM


All times are GMT -5. The time now is 06:12 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration