VirtualHost RemoveHandler

7 posts / 0 new
Last post
#1 Mon, 05/19/2014 - 07:06
nerdy

VirtualHost RemoveHandler

Hi, when i create a new virtual server on my webmin i see that it comes with this 3 lines in the end of virtual host:

RemoveHandler .php RemoveHandler .php5 php_admin_value engine Off

but in my server virtualhost template is:

ServerName ${DOM} ServerAlias www.${DOM} DocumentRoot ${HOME}/public_html ErrorLog /var/log/virtualmin/${DOM}_error_log CustomLog /var/log/virtualmin/${DOM}_access_log combined ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +FollowSymLinks allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks

so i need to remove this 3 lines that virtualmin adds automatically when i add a new domain to my virtualservers without removing them manually, if this entries:

RemoveHandler .php RemoveHandler .php5 php_admin_value engine Off

are on a template vhost php pages and whole website gives me a download and don't execute php.

any suggestions?

regards,

Nerdy

Mon, 05/19/2014 - 09:31
andreychek

Howdy,

It's actually normal that the VirtualHost contain the RemoveHandler lines near the end of the VirtualHost block.

That's not likely the cause of the issue you're seeing.

Are you by chance using a third party version of PHP for your distro? That's the most common cause of the symptoms you're seeing.

What distro/version is it that you're using there?

-Eric

Mon, 05/19/2014 - 10:11
nerdy

Hi Eric, my php version is: 5.4.23 and my server api is: Apache 2.0 Handler

my distro version is: Ubuntu-12.04-precise-64-minimal

i'm using a php version that comes with zend server.

i need that virtualmin doesn't insert this entries when create che virtualhost: RemoveHandler .php RemoveHandler .php5 php_admin_value engine Off

without editing the virtual host files and add # for ignore that rules.

any suggestion?

regards,

Nerdy

Tue, 08/29/2017 - 06:32 (Reply to #3)
undereyes

Hi, do you solve this? I have the same problem, when I create a new Virtual Server always add RemoveHandler and I must to comment this lines.

Sat, 09/02/2017 - 13:17 (Reply to #4)
Joe
Joe's picture

Why must you comment out the lines? I mean, what problem are you trying to solve by doing so?

--

Check out the forum guidelines!

Sun, 09/03/2017 - 04:36
undereyes

The pages with PHP do not work, the problem is that it must come from another site but commenting on those lines already works.

Tue, 09/05/2017 - 00:58 (Reply to #6)
Joe
Joe's picture

Huh...what execution mode are you using?

The only time Virtualmin should be adding those is if mod_php is enabled in Apache, and you're using an execution mode other than mod_php. If you aren't using mod_php I recommend disabling it entirely (I have wanted to disable mod_php, by default, for about five years, but people really get mad when I try!). But, disabling it will cause Virtualmin to not add those directives.

--

Check out the forum guidelines!

Topic locked