Apache not loading correct config it seems

Issues related to applications and software problems
Post Reply
MuDeKi
Posts: 3
Joined: 2018/02/21 15:05:55

Apache not loading correct config it seems

Post by MuDeKi » 2018/02/21 15:16:19

Hello,

I am using CentOs 7 and have it running for quite some time now. Months ago I noticed a problem that when rebooting the server my configuration for Apache was incorrect. Is was not loading all the Vhost and was only showing the default welcome page or the 'index of /' webpage. I found out that after a (couple of) reboot it somehow somewhy started working again. But now I have restarted the server again and I cannot get it to work anymore. I think it is not loading the correct configuration. I used this website to set up my server: https://www.digitalocean.com/community/ ... n-centos-7

Now I have in my /etc/httpd/conf/conf.d the 'correct' configuration. That is where all the virtualhosts are loaded. But now it seems somehow that httpd when started is loading the configuration from /usr/local/apache/conf/conf.d.

I tried creating a symbolic link for the /usr one to the /etc one but then I got all kind of other errors. I have set a complete backup back. I have uninstalled httpd (manually removed both directories), reinstalled it and copied the config back. But somehow it just does not work. It seems not to load my config from the sites-enabled directories. Even though, when I do "apachectl configtest" I do get some warnings from my virtualhosts it seems.

I have no clue how I can get my sites to show up correctly again. Does anyone have any pointers of what I could do to do further troubleshooting? Thanks in advance!

User avatar
TrevorH
Forum Moderator
Posts: 22787
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Apache not loading correct config it seems

Post by TrevorH » 2018/02/21 16:05:51

Are you running some control panel? Nothing that CentOS ships uses /usr/local at all.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

MuDeKi
Posts: 3
Joined: 2018/02/21 15:05:55

Re: Apache not loading correct config it seems

Post by MuDeKi » 2018/02/21 16:33:27

Yes, I am running CWP7.admin. But I have been running that since day 1.

The strange thing is that if I run rpm -qc httpd" I do get the config I expect (httpd.conf from /etc/httpd/conf).

/etc/httpd/conf.d/autoindex.conf
/etc/httpd/conf.d/userdir.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf.modules.d/00-base.conf
/etc/httpd/conf.modules.d/00-dav.conf
/etc/httpd/conf.modules.d/00-lua.conf
/etc/httpd/conf.modules.d/00-mpm.conf
/etc/httpd/conf.modules.d/00-proxy.conf
/etc/httpd/conf.modules.d/00-systemd.conf
/etc/httpd/conf.modules.d/01-cgi.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/logrotate.d/httpd
/etc/sysconfig/htcacheclean
/etc/sysconfig/httpd

User avatar
TrevorH
Forum Moderator
Posts: 22787
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Apache not loading correct config it seems

Post by TrevorH » 2018/02/21 16:44:35

Then you need to take your questions to CWP as it has nothing whatsoever to do with the CentOS Project other than them stealing our good name to brand their product. I wouldn't touch it with a bargepole...
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

MuDeKi
Posts: 3
Joined: 2018/02/21 15:05:55

Re: Apache not loading correct config it seems

Post by MuDeKi » 2018/02/21 16:52:14

Thanks for your reply. You are right there, sorry to have bothered. Reading into CWP it does way more to the OS than expected and I can understand people here cannot aid me. Sorry for that and thanks for your time.

In case anyone might read this and have a amazing idea, please let me know. I'll try to find a way to see if I can bring my server back to life (webserver that is).

Post Reply