Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to disable every form of scripting (PHP, ASP.NET, CGI) for a specific vhost in my Apache2 setup. Only plain old HTML pages.

Scripting must remain enabled for all other vhosts in the server.

It's not a security concern, it's a commercial concern (customer pays less for hosting)

Is it possible and how can I do that?

[Edit] From what I've found around the web, I'm going to try the following

RemoveHandler .php .phtml .php3
RemoveType .php .phtml .php3
RemoveHandler .aspx .ascx .ashx .asmx .asax .soap .rem axd .cs .vb .master .sitemap .resources. skin .browser .webinfo $
RemoveType .aspx .ascx .ashx .asmx .asax .soap .rem axd .cs .vb .master .sitemap .resources. skin .browser .webinfo .re$
php_flag engine off

This selectively disables PHP and .NET which are the only scripting runtimes installed

share|improve this question
    
What have you tried? –  Alastair McCormack Oct 20 '12 at 9:58
    
@Fuzzyfelt I haven't tried anything yet because I was very confused about how to do it before reading answer and a few articles about PHP –  djechelon Oct 20 '12 at 11:18

1 Answer 1

Try SetHandler default-handler in the vhosts in question.

Compare: Apache Handler documentation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.