PHP not working on sub-server

I have a dedicated server running on Debian 7. I installed Webmin and configure my domain as
I uploaded my Wordpress into the public_html folder on the FTP.

I then created a sub-server to get a subdomain like or I want to install different or CMS website to get familiar with them.

But I have a problem when executing php files on address, the files are not interpreted and e I see their contents directly appear in my browser.

Here is a screenshot:

Thank you for your help.


Hmm, sub-servers should work without a problem on Debian 7.

Which PHP version are you using?

You can determine by running the command “php -v”.


Thanks for reply :slight_smile:

I’m using PHP 5.4.4

Hmm, that appears to be correct.

Is there by chance a .htaccess file in the public_html folder?

Having a .htaccess file with certain lines in it could cause what you’re describing… if you have one, try renaming it to “htaccess.old” or something like that and see if you continue to observe the same behavior.


On the public_html i have a .htaccess for wordpress.

I rename it but it’s not working when i try to run wordpress on :frowning:

If you go into System Settings -> Re-Check Config, does it detect any problems?


I have no error when i re-check config.

I have try something today:

I have try a modification on php5.conf in /etc/apache2/mods-available/
When I uncomment SetHandler application/x-httpd-php php work on but not on

If that can guide you on search…


I’ve been experiencing this same problem with Virtualmin GPL on a OpenVZ VPS running Debian 7.

The server is not a subserver, but a top level server. I’m pretty familiar with installing Virtualmin, and everything usually works great out of the box, but with this particular install on Debian 7, php scripts aren’t being executed and are being shown as plain text.

The server is using mod_php.

What fixed the problem for me was to add the following lines to /etc/apache2/mods-available/mime.conf :

AddHandler php5-script .php
AddType text/html .php

After saving and reloading Apache, PHP scripts are running fine.