After creating a virtual server, php pages doesn't appear to work

I created a virtual server, but all that the virtual server can display are html pages.

It cannot display php based pages. How do I enable PHP or install PHP on this server? Strange part is that on another virtual server, PHP works. I thought using the “Create Virtual Server” wizard would automatically give the same settings.

Please let me know.


PHP should indeed work by default.

What distro/version are you using?

And if you go into System Settings -> Re-Check Config, do you notice any problems?



I have the same problem. I installed webmin/virtualmin on ubuntu 13, everything seem to work great, except for the php. It is my first setup with virtualmin, when I check the configuration I have this:

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active …
Your system has 995.14 MB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.
Apache is installed.

The following PHP versions are available : 5.4.9 (/usr/bin/php5)

Webalizer is installed.

MySQL is installed and running.

ProFTPd is installed.

Logrotate is installed.

Using network interface eth0 for virtual IPs.

IPv6 addresses are available, using interface eth0.

Default IP address for virtual servers is ****.

Quotas are not enabled on the filesystem / which contains home directories under /var/www and email files under /var/www. Quota editing has been disabled.

All commands needed to create and restore backups are installed.

The selected package management and update systems are installed OK.

… your system is ready for use by Virtualmin.

in ssh my php seem to work

php -v
PHP 5.4.9-4ubuntu2 (cli) (built: Mar 11 2013 16:09:26)
Copyright © 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2012 Zend Technologies

but if I go to a webpage with some php, my browser show it like text.

I’m not sure what to check.



Virtualmin only supports the Ubuntu LTS releases… the latest LTS release is 12.04.

It’s possible to get it to work on newer non-LTS releases, but it’s a lot more work, and requires a lot of manual setup :slight_smile:

There’s information here on performing a manual installation:

In particular, the area you’d want to review is the Apache setup section.

Also, you’d want to go into System Settings -> Re-Check Config, that’s able to detect some common problems.