Hi everyone.

I'm running the Turnkey LAMP appliance version 12.1 (it needs to be 32-bit since my development machine is still running Windows XP).  Most of the time the appliance works perfectly.  But every once in a while - seemingly at random - Apache stops serving my development web pages.

The administration pages (Webmin, PhpMyAdmin, Shell) still work normally, but the browser shows a blank window without errors for my pages.  The browser console shows a Network Error: 404 message.  Apache's 404 page does not display.

At first I thought it may be interference from MS VirtualPC, in which I had my earlier development VMs.  But the problem persists since I've stopped using it.

Restarting Apache, the VM, VirtualBox and VBoxSVC has no effect.  Only a complete restart of the host seems to work.  UPDATE: very occasionally restarting the VM does fix it - but it seems to be as random as the initial failure.

I've verified that VirtualBox's shared folder (where my source files are) is still working.  I can find no errors in any log files of Windows, VirtualBox, Apache or PHP.  Or in any of the logs accessible through Webmin - with one exception.  During the error condition /var/webmin/miniserv.error receives one or more instances of the following line for each page load attempt:

[07/Jan/2014:21:49:17 +0000] [] Bad Request : This web server is running in SSL mode. Try the URL <a href=''></a> instead.<br>

The page I'm loading is http://design3.dev/ which is mapped to localhost.  The LAMP control panel,, behaves the same way during the error condition.

VirtualBox's log claims NAT is mapping that to (which should be the default for user web pages).  The address is not one I recognise from any configuration files or documentation I've looked through.

Altering the SSL options in the virtual server has no effect.  Adding https to the URL results in a "Secure Connection Failed" error in the browser.

Basically, I'm out of my depth.  I've checked everything that looks relevant but can't figure out what specific element is failing.  Can anyone advise me on what I can do from here?  What can I test?  Even if I only knew what service or setting to reset to restore operations, I'd be happy.

Thanks in advance.

Jeremy Davis's picture

My instinctive first guess is that it is a VirtualBox, Windows, DNS, web browser or perhaps even networking issue... Although on further pondering I can't help but think that perhaps there is something else trying to use port 80 on your computer (It sounds like you are using NAT so if there were another service on your PC trying to use port 80 that would create a race condition where it would be a case of whichever gets in first wins and works).

FWIW I have been running TKL LAMP servers of every version of TKL dating back years (although not always on VBox and never with VBox NAT networking) and have never run into that particular issue. However it is definitely strange that the other pages (Webmin etc) continue to function properly when the main HTTP page doesn't (further suggesting to me the possibiloity of a port conflict).

If it is something on the TKL end then surely there should be something in the Apache logs (/var/log/apache2). Also the log entry you mention for miniserv.errror isn't relevant. That is simply an error noting that you (or someone) tried to contact Webmin on the server using HTTP (rather than HTTPS).

To help you troubleshoot the issue I would suggest that you change from NAT to Bridged networking (in VBox) and see if the issue persists.


I managed to get it working with Host Only networking instead of NAT.  (I had a bit of trouble getting Bridged to work - and didn't really want the appliance exposed to a wider network anyway).

It's been a few days now with no sign of problems.

Since you mentioned a race condition I've been rethinking the context of the failures.  It's possible they occured more frequently if I started the appliance later in the day - which would support the notion of something else grabbing the port first.  But I can't honestly be sure.

Definitely can't see anything noteworthy during a review of the logs.  A startup followed soon by a shutdown marks where it fails to serve pages.  But apache doesn't seem to "see" anything wrong at that time.

Unfortunately I don't have the time or skills right now to chase this further - but at some stage I would like to know what the actual problem was.  For now I'm glad I can focus on coding again.

Thanks again for the advice.

Add new comment