Virtual Hosts deleted during overnight update
3 nights ok my virtual hosts were removed from httpd.conf overnight. I tried various changes without success and yesterday restored from an image which resolved the problem. Unfortunately, the problem recurred last night.
I also get an alert FAILED: dnsadmin followed by a RECOVERED which is presumably connected.
httpd.conf has following as expected
Include "/usr/local/apache/conf/includes/post_virtualhost_2.conf"
My virtual hosts are defined in /usr/local/apache/conf/includes/post_virtualhost_2.conf - this file hasn't been changed for several months.
xyz1 is a cpanel account (and hence a Linux user) xyz2 is a linux user but there isn't a cpanel account for xyz2 If I run httpd -S, I get the following repeated for each of the VirtualHosts I'm trying to create. "[Fri May 06 11:15:16 2016] [warn] VirtualHost xxx.xxx.xxx.xxx:80 overlaps with VirtualHost xxx.xxx.xxx.xxx:80, the first has precedence, perhaps you need a NameVirtualHost directive" I have tried adding NameVirtualHost xxx.xxx.xxx.xxx:80 which has prevented the warning but not helped otherwise I have tried using *:80 in place of xxx.xxx.xxx.xxx:80 which hasn't helped. A colleague (who has long gone!) wrote the post_virtualhost_2.conf file. I do not want to move my DocumentRoot to be under /home/xyz1/ (ie the cpanel path) as it contains a complicated jenkins/git development environment which would introduce further problems I'm fairly sure I just need to fix my post_virtualhost_2.conf work with the changes cpanel has made but I'm at a bit of a loss .... Thanks for any advice. access: root administrator /etc/redhat-release:CentOS release 5.11 (Final) /usr/local/cpanel/version:11.56.0.13 /var/cpanel/envtype:xen pv CPANEL=release Server version: Apache/2.2.29 (Unix) Server built: Jun 19 2015 14:19:59 Cpanel::Easy::Apache v3.30.2 rev9999 PHP 5.4.42 (cli) (built: Jun 19 2015 14:26:24) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies mysql Ver 14.14 Distrib 5.1.73, for unknown-linux-gnu (x86_64) using readline 5.1
post_virtualhost_2.conf contains several VirtualHost definitions
ServerName abc.mydomain.co.uk
ServerAlias www.abc.mydomain.co.uk
DocumentRoot /home/xyz2/public_html/abc
ServerAdmin webmaster@abc.mydowmain.co.uk
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/abc.mydomain.co.uk combined
CustomLog /usr/local/apache/domlogs/abc.mydomain.co.uk-bytes_log "%{%s}t %I .\n%{%s}t %O ."
## User xyz1 # Needed for Cpanel::ApacheConf
UserDir enabled xyz1
suPHP_UserGroup xyz2 xyz2
SuexecUserGroup xyz1 xyz1
RMode config
RUidGid xyz1 xyz1
# For more information on MPM ITK, please read:
# apache2-mpm-itk
AssignUserID xyz1 xyz1
ScriptAlias /cgi-bin/ /home/xyz2/public_html/abc/cgi-bin/
# To customize this VirtualHost use an include file at the following location
# Include "/usr/local/apache/conf/userdata/std/2_2/xyz1/abc.mydomain.co.uk/*.conf"
xyz1 is a cpanel account (and hence a Linux user) xyz2 is a linux user but there isn't a cpanel account for xyz2 If I run httpd -S, I get the following repeated for each of the VirtualHosts I'm trying to create. "[Fri May 06 11:15:16 2016] [warn] VirtualHost xxx.xxx.xxx.xxx:80 overlaps with VirtualHost xxx.xxx.xxx.xxx:80, the first has precedence, perhaps you need a NameVirtualHost directive" I have tried adding NameVirtualHost xxx.xxx.xxx.xxx:80 which has prevented the warning but not helped otherwise I have tried using *:80 in place of xxx.xxx.xxx.xxx:80 which hasn't helped. A colleague (who has long gone!) wrote the post_virtualhost_2.conf file. I do not want to move my DocumentRoot to be under /home/xyz1/ (ie the cpanel path) as it contains a complicated jenkins/git development environment which would introduce further problems I'm fairly sure I just need to fix my post_virtualhost_2.conf work with the changes cpanel has made but I'm at a bit of a loss .... Thanks for any advice. access: root administrator /etc/redhat-release:CentOS release 5.11 (Final) /usr/local/cpanel/version:11.56.0.13 /var/cpanel/envtype:xen pv CPANEL=release Server version: Apache/2.2.29 (Unix) Server built: Jun 19 2015 14:19:59 Cpanel::Easy::Apache v3.30.2 rev9999 PHP 5.4.42 (cli) (built: Jun 19 2015 14:26:24) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies mysql Ver 14.14 Distrib 5.1.73, for unknown-linux-gnu (x86_64) using readline 5.1
-
Hello, Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment