Virtualmin Apache2 Ubuntu

February 15, 2015 1.3k views

I have seemingly the exact same issue as asked in this question: https://www.digitalocean.com/community/questions/virtualmin-apache2-default-page

I'll include all the steps I've taken, in case I've done something stupid.

I've created an Ubuntu 14.04 x64 droplet and then installed Virtualmin using the download and install scripts on: https://www.digitalocean.com/community/tutorials/how-to-install-and-utilize-virtualmin-on-a-vps

From there, I went to the virtualmin :10000 admin and followed the wizard. I then went to Webmin > System > Bootup and Shutdown and stopped and prevented from boot at startup for Mailman. Then I went to Virtualmin > System Settings > Features and Plugins and turned off Webalizer, Log file, Spam filtering, Virus filtering, AWstats, Mailman

I then installed the suggested updates and ran Re-Check Configuration, which comes back "your system is ready for use by Virtualmin"

Next I created a virtual server using all defaults except I unchecked use DNS zone.

Checking in SFTP, I can see all the files are created correctly, yet the site still shows the index file of /var/www/html
Out of curiosity, I created a file called test.php in that folder with the contents: <?php phpinfo(); ?> which is all it shows in the browser, so it looks like PHP isn't working on the frontend either.

I found mention to try:

apt-get install apache2-suexec-custom
cd /etc/apache2/suexec
nano www-data

and change "/var/www" to "/home", but it was already set to "/home".

The question I linked to above suggests that it's futile to try and make virtualmin work, but that doesn't seem right. When you run the virtualmin install script, it actually asks you whether your OS is one of a few, which includes Ubuntu 14.04. Surely the install script must make it work out of the box? If not, why aren't there thousands of questions asking exactly this?

I'm thoroughly stumped, any help would be greatly appreciated.

1 comment
  • I have the same problem. Freshly installed Ubuntu 14.04 and virtualmin. When i type the server's IP address on my browser, the Ubuntu start page shows up, instead of the website on /home/.../public_html.

    Curious if this problem was ever solved?

1 Answer

Regarding PHP
I couldn't get any of my Virtualmin / webmin sites to interpret php. A file similar to your test.php was shown in the browser uninterpreted.

PHP is installed and the PHP5 module is "on" in webmin / ApacheWebserver / global config / configure Apache modules.
However, there's nothing listed in webmin / ApacheWebserver / global config / MIME types to correctly process .php files.

So I added
MIME type: application/x-httpd-php
Extensions: php php5
(and hit apply changes)

And now my *.php files are correctly interpreted as PHP.

Have another answer? Share your knowledge.