ClayB's picture

It's been too long!!

I haven't setup an apache server in quite some time and since all of my sites are on an old server running php 5.6, I thought it may be time to upgrade the server. So, I download a fresh oda of Turnkey Lamp and installed away.

I'm able to access the Webserver and Adminer via IP Addresses. I was able to setup the Virutal Host the way the old server had them. Typing in the domain name successfully gets me to the new server, however, it takes me to the default login page for Turnkey, not the root directory of the new website.

I know this is something simple that I have missed. Can anyone help me discover what that something is?

DocumentRoot /var/www/newdomain
<Directory "/var/www/newdomain">
allow from all
Options None
Require all granted
ErrorLog /var/log/www/newdomain/newdomainError.log
LogLevel emerg
TransferLog /var/log/www/newdomain/newdomainAccess.log

error logs show:

[Wed Nov 14 14:13:14.860763 2018] [mpm_prefork:notice] [pid 682] AH00171: Graceful restart requested, doing restart
[Wed Nov 14 14:13:14.913059 2018] [:error] [pid 682] python_init: Python version mismatch, expected '2.7.5+', found '2.7.13'.
[Wed Nov 14 14:13:14.913161 2018] [:error] [pid 682] python_init: Python executable found '/usr/bin/python'.
[Wed Nov 14 14:13:14.913169 2018] [:error] [pid 682] python_init: Python path being used '/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Wed Nov 14 14:13:14.913177 2018] [:notice] [pid 682] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Wed Nov 14 14:13:14.913184 2018] [:notice] [pid 682] mod_python: using mutex_directory /tmp 
[Wed Nov 14 14:13:14.922836 2018] [ssl:warn] [pid 682] AH01909: localhost:12322:0 server certificate does NOT include an ID which matches the server name
[Wed Nov 14 14:13:14.923119 2018] [ssl:warn] [pid 682] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Wed Nov 14 14:13:14.923275 2018] [mpm_prefork:notice] [pid 682] AH00163: Apache/2.4.25 (Debian) mod_python/3.3.1 Python/2.7.13 OpenSSL/1.0.2l mod_perl/2.0.10 Perl/v5.24.1 configured -- resuming normal operations
[Wed Nov 14 14:13:14.923284 2018] [core:notice] [pid 682] AH00094: Command line: '/usr/sbin/apache2

Any ideas?

Jeremy Davis's picture

It sounds to me like it's still using the default config, rather than your new config.

You didn't state whether you'd edited the default Apache site /etc/apache2/site-available/000-default.conf or created a new one? If you've created a new one, you'll need to ensure that it's enabled, and that you disable the default. Also, note that as of Apache 2.4, all Apache config files MUST have the .conffile extension, otherwise Apache will simply ignore them. (Perhaps that's your issue?).

E.g. assuming that your new site config file is /etc/apache2/site-available/ disable default and enable your site like this:

# you can append the .conf, but it's not required
a2dissite 000-default

From your log it looks like you may have restarted Apache, but I'm not 100% sure. Regardless (as you likely already know, but just in case), after any Apache config changes it needs to be restarted (FWIW reload works too, but it makes little difference):

# legacy service command
service apache2 restart


# systemd command
systemctl restart apache2.service
ClayB's picture

Thank you... disabling the default site did the trick! I knew it was something simple and had to reach DEEP into the brain to recall all of this! Some pieces were still absent so thanks for the assist!

ClayB's picture

The newly created site was already enabled and is what I thought was suppose to happen when creating the Virtual Host via the webmin interface.

The 000-default site needed to be disabled and once I disabled and reloaded apache, the newly created site resolved appropriately.

Thanks again!

Jeremy Davis's picture

Glad that got you going. FWIW, it didn't occur to me you may have been using Webmin...

Personally I much prefer to use the commandline as I find it less confusing, more verbose and more intuitive (and when I get confused I can google easily). But I get that as a full time Linux user, very comfortable at the commandline and with strong google-fu, that my experience/perspective is not really the norm! :)

My understanding is that whilst Webmin does do some basic config config checking, it's limited to finding strictly invalid config (not config that is valid but just won't do what you expect). It is a bit counter-intuitive that it wouldn't disable the default site if it would essentially override your new one. But OTOH I guess providing the level of config parsing that would require, whilst ensuring that it doesn't break anything else in the process is probably outside the scope of Webmin.

Anyway, glad you got it going in the end! :)

Add new comment