Hosting only on VirtualMin

13 posts / 0 new
Last post
#1 Thu, 03/10/2016 - 03:20

Hosting only on VirtualMin

Hi everyone.

First of all, I'm definitely a newbie, so I apologise for not understanding fully.

I have a website for a friend that is getting too resource hungry for a shared server, so I have got a linux centos6 dedicated server.

I have installed Virtualmin on it, and have logged into the Control Panel.

For now, I only want the site hosted on the server, the emails are taken care of with using google mail. The domain name is registered at Fasthosts.

To get this to work do I just need to do the following:

1/ Create a virtual server for the domain name.

2/ Alter the A records against the domain name (@, * and www), to the IP address of the dedicated server?

I have created a dummy virtual server to play around with, and when I try to 'Preview Website' from the Services bit of the Virtual Server, it doesn't load anything. Its just constantly loading, which makes me think I've done something wrong. In the home directory for that site, I've created index.html just to test that it shows something.

Many thanks in advance,


Thu, 03/10/2016 - 10:32


Just to clarify -- is DNS being hosted externally, such as at FastHosts?

If so, then yes, you'd want to change the A and CNAME records associated with your domain, so that they point to your dedicated Virtualmin server.

The MX record would point to your email service.

Also, within Virtualmin, you'd want to make sure that the Mail for Domain and BIND DNS Server features are disabled.

As far as testing goes --

If you go into Server Configuration -> Website Options, make sure that your newly added domain is set to be the default for that IP address.

Once you've done that, you should be able to browse to "x.x.x.x" in your browser (where x.x.x.x is your server's IP address). You should then see that index.html page that you setup.

If that doesn't work either, let us know and we can do some troubleshooting.


Thu, 03/10/2016 - 10:51

THanks very much for the reply.

Yes the DNS is managed by FastHost I think. To alter the DNS settings I have to log into my account at fasthosts and make the changes, so I assume so.

So I'll leave the MX records as they are, so that it still uses google mail.

I'll change those two settings within VirtualMin as suggested. Just out of interest, what damage would leaving them on do?

Finally, if I were to create two virtual servers, same purpose but different domain names, what should happen if I go to the IP Address in a browser. How would it know which virtual server to load?

I really appreciate the reply! I'm sure I'll pick it up in no time, and just need the help in the beginning. Many thanks, Craig

Thu, 03/10/2016 - 11:37
Welshman's picture

Sounds fine craig, maybe just DNS propagation. Check here to see how things are going, it can take some time.

You can specify what is the main domain for the IP but if your DNS is ok it will just load the domain you want, if you goof like add four wwww's or two ww's it will probably bring up the default domain for the IP but all of this can be fixed.


Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Thu, 03/10/2016 - 13:36


I'll change those two settings within VirtualMin as suggested. Just out of interest, what damage would leaving them on do?

If the Mail for Domain feature is enabled in Virtualmin, it will cause mail to be delivered locally, regarding of MX record settings. But since there isn't an account setup for that, it would then bounce.

Similar with the BIND DNS Domain settings -- if there is a DNS zone for a particular domain active on your server, DNS lookups will use that, and not the one at FastHosts. So unless it was changed to match your existing one, the IP addresses being returned for it wouldn't be what you wanted.

Regarding the IP address --

If you go to the IP address of your server, the default domain is what will show up.

You can tweak which is the default by going into Server Configuration -> Website Options.


Fri, 03/11/2016 - 14:14

Thanks so much for the replies!

Really appreciate it.

I'm just looking at disabling the two features you recommended.

The mail one is straight forward to find under Edit Virtual Server --> Enabled Features --> Untick Mail for Domain enabled. I presume thats right.

Where do I find the Bind DNS Settings? Is this against each server?

Tue, 03/15/2016 - 05:58

Hi All,

So i've got a completely new server now and installed VirtualMin on from Scratch!

I've disabled BIND DNS domain in the Features and Plug In's page.

I've created a new virtual server and upload a index.html test page to the public_html folder.

What I would like to do is get the site up and running on the virtual server before I alter any DNS settings against the domain.

At the minute, If I use the Preview Website, it doesn't load. Keeps trying to load something.

Have I done something wrong in the config, or because its a new server it something waiting to go through. Bear in mind I haven't alter anything against the domain name itself yet.

Tue, 03/15/2016 - 16:57

Please ignore that last comment. I got the index.html fine to display correctly.

Now, I've uploaded a WordPress site backup.

When I preview or visit the ip, instead of displaying the website, it downloads a file called download.bin.

To get it to work, I altered the PHP Execution Mode to mod_php. Is this safe and normal procedure?

The default FCGid tried to download the file...

Many thanks. Craig

Tue, 03/15/2016 - 20:18


Hmm, what distro/version is it that you're using there?

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


Tue, 03/15/2016 - 20:37

Sorry wrong thread


Wed, 03/16/2016 - 03:54

Hi Eric,

Thanks for your reply.

Its running CentOS 7, and if I run the command rpm -qa | grep openssl, it returns this:

openssl-devel-1.0.1e-51.el7_2.4.x86_64 openssl-libs-1.0.1e-51.el7_2.4.x86_64 openssl-1.0.1e-51.el7_2.4.x86_64

Is that the information you require.

I also attempted to upgrade the PHP version on the server from 5.4, to 5.5 using these instructions

CentOS 7 Upgrade to PHP 5.5ΒΆ
To upgrade to PHP 5.5, use the Red Hat Software Collections (SCL) repository.

Before upgrading, evaluate all of your PHP apps for compatibility with PHP 5.5.

Follow these steps to install PHP 5.5 from SCL. First install the SCL repository:

yum install centos-release-scl
Then install PHP 5.5 and these modules:

yum install php55 php55-php php55-php-gd php55-php-mbstring
You must also install the updated database module for your database. This installs the new PHP 5.5 module for MySQL/MariaDB:

yum install php55-php-mysqlnd
Disable loading the old PHP Apache modules by changing their names:

mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/
mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/
Copy the PHP 5.5 Apache modules into place:

cp /opt/rh/httpd24/root/etc/httpd/conf.d/php55-php.conf /etc/httpd/conf.d/
cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-php55-php.conf /etc/httpd/conf.modules.d/
cp /opt/rh/httpd24/root/etc/httpd/modules/ /etc/httpd/modules/
Then restart Apache:

service httpd restart
Verify with phpinfo that your Apache server is using PHP 5.5 and loading the correct modules; see PHP Version and Information to learn how to use phpinfo.

Since that, it appears as though I have both versions of PHP on the server. Certainly through VirtualMin I can choose one or the other. When I run php-v in SSH, it returns 5.4.

So perhaps I did something wrong upgrading PHP version?

I would appreciate any help.

Many thanks, Craig

Thu, 03/17/2016 - 10:44


I'm actually looking for what Linux distribution and version that you have there. Something like CentOS 6, or Debian 8, or Ubuntu 12.04?


Thu, 03/17/2016 - 10:46

My apologies Eric!

Its CentOS 7

Topic locked