Submitted by sfatula on Sun, 01/29/2012 - 23:51
I am moving a virtual server from one machine to another, old was centos 5, new is centos 6.
When restoring, it gets to:
Restoring Webalizer configuration files and Cron job ..
and then reports the error "no logging directive found in webserver configuration!"
Ok, great, but WHERE should be be found, what screen or what file?
Status:
Active
Comments
Submitted by JamieCameron on Mon, 01/30/2012 - 11:23 Comment #1
It is looking for the domain's
virtualhost
block in/etc/httpd/conf/httpd.conf
, for aCustomLog
line. Does this exist for your domain? Without it, Virtualmin doesn't know what log file Apache is using ...Submitted by sfatula on Mon, 01/30/2012 - 11:30 Comment #2
Not sure where it is looking, this is a NEW domain being restored onto a machine, so, no, it didn't exist for that domain as that domain was not there. Yes, the line existed on the old machine.
If it matters, we have specified in Webmin Apache module configuration for the field "Directory to create links in for new virtual servers" a value /etc/httpd/servers so that we can keep them separate. That directory is currently empty, of course, since trying to restore a server on this new machine.
In the field File or directory to add virtual servers to we have servers/
Starting to think there is a bug here... With backup / restore.
Submitted by JamieCameron on Mon, 01/30/2012 - 11:37 Comment #3
It's possible that this links directory is causing some problems ..
If you create a new test domain on the new system, does it work OK? If you run validation on this new domain with a command like
virtualmin validate-domains --domain example.com --all-features
, does it report any errors?Submitted by sfatula on Mon, 01/30/2012 - 11:44 Comment #4
Curiously... When I manually create a new domain, I get an error - Failed to create virtual server : AWstats reporting is already enabled for this domain
Which of course it not true since there is no current vurtual server! So, this adds a new question - why this message! Something must have changed here as we have always used different directory for server config files on Centos 5.
From /etc/httpd, grep -r awstats * returns not a single line.
Submitted by sfatula on Mon, 01/30/2012 - 11:48 Comment #5
Does the awstats module come from Virtualmin repository? If so, perhaps that is the issue - I see it came from somewhere else when the machine was loaded up. epel.
Submitted by sfatula on Mon, 01/30/2012 - 11:55 Comment #6
Scratch that, it did not come from there, it's version 7.0.1.
I see in awstats webmin module the domain I tried to restore that failed, and, the new domain, even though there is no domain. Both of these report a log file of /var/log/httpd/access_log, which should be incorrect. On the old machine, the logfiles show up in /var/log/virtualmin/domain...
So, perhaps the clue here is why are they not going there, and, are they supposed to go there?
Submitted by JamieCameron on Mon, 01/30/2012 - 12:59 Comment #7
That AWstats issue can happen if there is a file in
/etc/awstats
already which contains the same name as domain you are creating. Typically this can be safely deleted..Submitted by sfatula on Mon, 01/30/2012 - 13:09 Comment #8
Still; not working. So, deleted the file for the new test host in /etc/awstats. I create a new virtual server, and, I get the following (only errors shown, the rest was ok):
Performing other Apache configuration .. .. configuration failed : Apache virtual host was not found at /usr/libexec/webmin/web-lib-funcs.pl line 1360.
Setting up scheduled Webalizer reporting .. .. no logging directive found in webserver configuration!
Setting up log file rotation .. .. no logging directive found in webserver configuration!
Setting up AWstats reporting .. .. done
Setting up password protection for AWstats .. .. done
Adding analytics tracking to website configuration .. .. no Apache virtualhost found!
Submitted by JamieCameron on Mon, 01/30/2012 - 13:15 Comment #9
I think the "Directory to create links in for new virtual servers" setting you mentioned in comment #2 is wrong. If you want each domain to get its own file, what you need to do is :
/etc/httpd/conf/vhosts
, and create that directory.httpd.conf
there is a line like :Include /etc/httpd/conf/vhosts/*
Submitted by sfatula on Mon, 01/30/2012 - 13:24 Comment #10
Ok, but note that it did in fact create the configuration file in /etc/httpd/servers. Those settings ar ethe same as they are on the previous working Centos 5 server.
But you are correct on the one key point - the include seems to be missing. Doh.
So, added the line, and creating the new test server works fine. Did not change the settings you mentioned in message #9 #1 and #3.
So, now deleted the partially created server I was trying to restore, and, restored it just fine.
So, it works again, was simply missing the include. I guess the gui doesn't add it, it expects you to manually add it, which is fine I guess.
Submitted by JamieCameron on Mon, 01/30/2012 - 15:51 Comment #11
Yeah, usually those settings don't get changed by users at all - they are set by default to match the linux distro's confguration, such as Ubuntu and Debian which use the
/etc/apache2/sites-enabled
directory.Submitted by sfatula on Tue, 01/31/2012 - 01:51 Comment #12
So, this is not resolved. I have a similar problem on the second licensed host I just moved. Of course, the include is there this time. :-)
I tried your validate-domains command for the domain in question, all features ok.
I am trying to edit an existing virtual server, and, enabled apache website under features. This fails on the very first step. I do not understand why, have spent hours and hours on this. The domain would not restore from another machine, so, gave up on restore and simply want to enable the website, and then, will copy over the files. But I can't even enable Apache for this virtual server. The screen output is:
Setting up log file rotation .. .. no logging directive found in webserver configuration! Updating Webmin user .. .. done
Updating Webmin user .. .. done
Saving server details .. .. done
Re-loading Webmin .. .. done
However, no virtual server file is stored in /etc/httpd/servers. Yet, creating a new domain does store a file there.
I don't understand why in this virtual server which is currently email only, I cannot enable apache under edit virtual server. Certainly, the template file does have logging directives.
Submitted by JamieCameron on Tue, 01/31/2012 - 13:44 Comment #13
I can login to this system and take a look if you like? Either enable virtualmin remote support access, or email me credentials for SSH access at jcameron@virtualmin.com
Submitted by sfatula on Tue, 01/31/2012 - 14:02 Comment #14
Remote access granted.
Submitted by JamieCameron on Tue, 01/31/2012 - 18:21 Comment #15
Ok, this should be fixed now ... you were hitting a different bug, which will be fixed in the 3.90 Virtualmin release. I have manually patched your system with the fix in advance though.
Submitted by sfatula on Tue, 01/31/2012 - 18:27 Comment #16
Can you send me a link to the ticket for the bug so I know when it occurs? I have another system to load up as well, and, same idea. I'd like to understand when the bug occurs. Don't want to waste even more time on the other host.
I'd like to know if it affects not only restoring and/or enabling apache, but maybe also the security issue wher the site kept getting permission denied. Or, maybe it's just for odd circumstances?
Submitted by JamieCameron on Tue, 01/31/2012 - 18:54 Comment #17
Here is the original bug ticket : http://www.virtualmin.com/node/20410
This has no impact on security really .. it just causes the enabling of a website for an existing domain to do nothing.