How can I get Virtualmin to behave like a traditional web host (i.e. Godaddy/Hostgator)?

August 27, 2014 3k views

I have tried many times to spin up a droplet and then install Virtualmin. I followed the guide that was posted by DigitalOcean and then also tried with modifications. I can get Virtualmin installed, I can set up a site, and I can then do a restore of my sites, but I have issues with formatting and function.

I have one Wordpress site and one Joomla site. I can restore these sites from GoDaddy to Hostgator and back without any issue. But when I restore them onto my droplet they do not function as intended.

Clearly I am missing some things. For example my sites do not initially work due to .htaccess paramaters. I had to comment out my +FollowSymLinks line on the Wordpress site. Also on both I have to remove the expirations lines, but then I discovered I needed to install a module for that.

The closest I have come is by running the following apt-get to install as many modules as I could find that matched the phpinfo on my HostGator hosting.

apt-get install php5-gd php5-GMP php5-imagick php5-intl php5-mcrypt php5-pspell php5-tidy php5-xmlrpc php5-xsl php-gettext php-soap php-date

I just want Virtualmin up and running and it to act like a major web host from a function standpoint, but act like a droplet from a performance standpoint.

I have tried using Joomla 14 and 12 (32-bit and 64-bit).

5 Answers

Its probably an apache configuration problem.

Are there any errors?

What do the logs show?


You've said they don't function as intended. You need to provide much more detail. The more you give, the more chance you have of getting help. Its also always helpful to post your distro, apache version, php version, config files of apache (via paste bin is probably best).


A host file? You mean /etc/host or C:\Windows\System32\drivers\etc\hosts to override DNS?

Whats in your host file? Thats sounding like a DNS/virtual host problem. I can see from your virtual host config file that its using IP based virtual hosting - not name based? I think you need to tell your domain to point to your droplet, then setup the joomla virtual host to be named based and not IP based.

With symlinks - it depends what its doing. It looks like your config for joomla is saying follow symlinks if owner matches. I've just read that several hosts have moved over to that as its more secure for shared hosting. Have a look at the link below - it seems to describe similar behavior to yours even though its on drupal. You might consider changing it to followsymlinks.


I think we should concentrate on getting the site viewable without a host file/500 internal error before tackling other stuff. Other members of the community might jump in with the answer to the other stuff, also :)

Just ignore what I said before, I think I'm confusing myself.. There isn't a problem at all with using a host file, I was getting mixed up with how apache name based virtual hosts are set up.

I don't think there is a problem with your htaccess file, per se, but htaccess files usually rely on apache configuration to be allowed to do stuff. The problem is likely your apache config not allowing the htaccess to behave as expected.

In joomla.conf file change

<Directory /home/perfectprofiler/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/perfectprofiler/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/perfectprofiler/fcgi-bin/php5.fcgi .php5


<Directory /home/perfectprofiler/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,FollowSymLinks
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/perfectprofiler/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/perfectprofiler/fcgi-bin/php5.fcgi .php5

You should now be able to uncomment this line :

#Options +FollowSymLinks

in your htaccess file

Restart apache.

Also, what is in these logs??

ErrorLog /var/log/virtualmin/perfectprofiler.com_error_log
CustomLog /var/log/virtualmin/perfectprofiler.com_access_log combined
  • Thanks for the change for +FollowSymLinks. I changed the config file and bounced the server.

    That looks like it fixed the 500 error, the site now comes up (unless just bouncing the server did something). I bounced around 28/Aug/2014:23:15 server time and pulled up the site a bit after that.

    Regarding the logs

    Here is the error log

    And here is the access (only since on new host).

    For the most part, I think the site is functioning as expected. The only issue I see is with the PDF generation plugin. Users take tests on this site and the results are emailed to them. In the other environments the resulting PDF is two pages (one for the user info and one for the results graph). In this environment the PDF is stretched across four pages for some reason...

    Of course the error log doesn't look too healthy.

    Thanks for much for your help so far!

  • Not sure what to do about that error log. A lot of php notices - that can mean there are issues with the actual php code. Maybe ask on the joomla forums? Does it happen with the other web hosts? If it doesnt then it might be that you're using a different php version than your host.

    I think the PDF problem is because of mismatched pdf versions. What are the requirements for the plugin vs what you have installed? What is the name of the plugin?

  • The error logs appear to be clean on HostGator where the site is currently hosted. At least from what I can tell. I am using the "Error Logs" icon in cPanel. I am not sure of another way to get at the apache errors. If they are clean, then I guess we are looking at a PHP version issue. I will try to test with different PHP versions and see if it cleans up. I think that may be the PDF issue as well, I will just have to see. The PDF product is TCPDF.

Thanks Mark, hopefully this helps.

I have tried running Ubuntu and CentOS, both with no luck as well as both 32 and 64 bit flavors of Ubuntu 12 and 14. I prefer Ubuntu, so my current test is running:

Any errors? Yes the log has a few. Please see: apache2/error.log

My specific issues:
1) After my umteenth iteration here, I can't recall what the .htaccess was that I needed to get my Joomla site to at least pull up. The site gets an HTTP 500 error right now, I am using a hosts file to access it. Here is the .htaccess
2) The Joomla site has some portions of text that do not format correctly (once the site is up)
3) The Joomla site has a pdf creator plugin that does not properly generate pdfs. I believe I fixed this with getting the PHP version at 5.3. Will need to test when I can get the site up again.
4) I would like to run the document expiration settings in my .htaccess. "ExpiresActive.." and "ExpiresByType.." I just don't know what widget to install for this support.
5) Is having to remark out "Options +FollowSymLinks" a problem?
6) I think I added enough stuff in with the apt-get in my first post to get my Wordpress site working properly. As far as I can tell it is good, but I just have an uneasy feeling since I am throwing stuff at the wall to see if it sticks. Not my favorite way to troubleshoot, but I clearly don't have extensive Linux knowledge.


Regarding hosts, the site I want to move is perfectprofiler.com. That site is live elsewhere right now because it will not work at DO on Virtualmin yet. So I am using a hosts file on my Windows desktop to test access to that site. I was making that comment so the readers of this thread would understand that the site is not live on DO.

Is there any reason I should not be able to use a HOSTS file to test? I can reconfigure the site to a new DNS name (i.e. test.perfectprofiler.com), but was hoping I didn't have to go through that each time. Utilizing a HOSTS file seems to work find on the other web providers, but maybe I am missing something with Virtualmin to do this.

I agree to focus on getting the site up past the 500. Is there anything in my .htaccess that looks like a problem. I am pretty sure something in there (or not in there) is causing my 500.

Have another answer? Share your knowledge.