Cloudmin replication messed up httpd.conf

9 posts / 0 new
Last post
#1 Thu, 08/14/2014 - 15:25
amityweb

Cloudmin replication messed up httpd.conf

I replicated all servers to another server, then did a IP swap in Linode, so all my sites would be on a new server. I did a test by changing my hosts file to add the domains to point to the new server, all OK.

I needed to restart apache, so when I did it failed. I could see it was messed up. This was the error:

Stopping httpd: [ OK ] Starting httpd: httpd.worker: Syntax error on line 1275 of /etc/httpd/conf/httpd.conf: Expected but saw [FAILED]

Indeed, there was this closing but no opening

There were 1299 lines in the new one, and 3235 in the old one, its like it cut off. I can email it to anyone interested but dont want to post it here.

I could not copy and paste the old one to the new server, because there are user IDs referenced e.g. SuexecUserGroup "#647" "#575". This also prevented apache starting when I copied and pasted.

So not sure what to do now.

Thanks

Thu, 08/14/2014 - 16:58
amityweb

Also, is there a way to repair the httpd.conf file now? The orifinal was messed up, the one I copied from the old server doesnt work, so I would need it to be "regenerated" by the server, all the Vhosts.

Thanks

Thu, 08/14/2014 - 19:58
amityweb

I started again from a new server, and it worked this time.

Its possible I may have replicated a single server while the other replication of all servers was in progress, I wonder if that conflicted. Or maybe it was I turned on SSL for one server while the replication was in progress.

Either way, all Ok now!

Fri, 08/15/2014 - 11:35
amityweb

Uh oh, its not fixed... httpd.conf has errors, I have not restarted Apache though, its all working, I know if I restart it Apache wont start. I hope to god Apache does not stop for some reason soon, I have no idea how to fix this messed up httpd.conf

httpd.worker: Syntax error on line 1275 of /etc/httpd/conf/httpd.conf: Expected </Directory> but saw </Files>
Fri, 08/15/2014 - 11:46
amityweb

Comparing old and new httpd.conf, it seems the awstats Files opening tag is missing...

So my http.conf is this:

AuthName "domain.com statistics"
AuthType Basic
AuthUserFile /home/malem/.awstats-htpasswd
require valid-user
</Files>

instead of this:

<Files awstats.pl>
AuthName "domain.com statistics"
AuthType Basic
AuthUserFile /home/malem/.awstats-htpasswd
require valid-user
</Files>

As far as I can tell, its just one line missing.

I can manually add that in, but then I have no idea if there are other mistakes, I hope Virtumain re-check config spots if its OK, so if I do an Apache restart it restarts OK.

Fri, 08/15/2014 - 11:48
amityweb

Also getting other tags missing

httpd.worker: Syntax error on line 1299 of /etc/httpd/conf/httpd.conf: Expected </Directory> but saw </VirtualHost>
Fri, 08/15/2014 - 11:57
amityweb

After fixing that second issue which was a missing , the re-check config works OK now. And as per another issue I reported here https://www.virtualmin.com/node/33953, all the virtual hosts are displaying, and I'm not getting the No Virtual Host Exists on 80 or 443 error messages. Fingers crossed all Ok now.

I guess there is an issue with Replication somewhere, to mess up the httpd.conf like that

Fri, 08/15/2014 - 12:32
andreychek

Howdy,

I'm unfortunately not too familiar with the problems you're seeing there, and Jamie doesn't usually see posts in the Forums here. However, if Cloudmin is responsible for replicating that Apache config from one server to another, and you're seeing some sort of corruption in that process, that definitely sounds bug-like.

My suggestion would be to open up a support request using the Support link above, and then Jamie can work with you to get that resolved.

-Eric

Sat, 08/16/2014 - 08:04
amityweb

OK have done, thanks.

Topic locked