Control Web Panel

WebPanel => Installation => Topic started by: lee069 on May 03, 2015, 11:57:38 AM

Title: apache not reading vhost?
Post by: lee069 on May 03, 2015, 11:57:38 AM
Hi and thanks for taking the time to read this.

I have seen several people with the same problem as me but yet haven't seen a fix.

My server will only display the website in /usr/local/apache/htdocs/ and seems to ignore the vhost file altogether.

Any fixes I could try?

Regards Lee.
Title: Re: apache not reading vhost?
Post by: Glenn on May 03, 2015, 12:13:18 PM
Hi there

please explain a bit more about the way you have set your server up , are you using varnish ?
Title: Re: apache not reading vhost?
Post by: lee069 on May 03, 2015, 12:22:02 PM
Hi, no I'm not using varnish.
I have a fresh install of centos 6.6 desktop minimum.
I've been over and over the setup's but can't find anything wrong.
The only thing I did by mistake was installed NGINX but I've disabled it again.

Many thanks Lee.
Title: Re: apache not reading vhost?
Post by: Glenn on May 03, 2015, 01:26:47 PM
Do you have DNS setup with www A records pointing to the server ip address for the domains that arent working ?
Title: Re: apache not reading vhost?
Post by: lee069 on May 03, 2015, 01:35:55 PM
yes I do.

www.farmradio.org.uk. IN A 79.78.xxx.xxx
Title: Re: apache not reading vhost?
Post by: Glenn on May 03, 2015, 02:14:01 PM
Ok i see whats happening if i visit the website , what does tail -f /usr/local/apache/logs/error_log show when you refresh the website ? it could be permissions on the include files or vhost file
Title: Re: apache not reading vhost?
Post by: Glenn on May 03, 2015, 02:16:44 PM
Also check file and folder permissions for the website files while youre at it
Title: Re: apache not reading vhost?
Post by: lee069 on May 03, 2015, 02:20:27 PM
the log shows this:-

[Sun May 03 15:02:05 2015] [error] [client 196.210.209.153] File does not exist: /usr/local/apache/htdocs/img, referer: http://www.farmradio.org.uk/
[Sun May 03 15:04:57 2015] [error] [client 196.210.209.153] File does not exist: /usr/local/apache/htdocs/img, referer: http://www.farmradio.org.uk/
[Sun May 03 15:06:47 2015] [error] [client 196.210.209.153] File does not exist: /usr/local/apache/htdocs/img, referer: http://www.farmradio.org.uk/
[Sun May 03 15:07:45 2015] [error] [client 196.210.209.153] File does not exist: /usr/local/apache/htdocs/img, referer: http://www.farmradio.org.uk/
[Sun May 03 15:08:46 2015] [error] [client 128.65.103.201] File does not exist: /usr/local/apache/htdocs/farmradio.xml
[Sun May 03 15:14:57 2015] [error] [client 196.210.209.153] File does not exist: /usr/local/apache/htdocs/img, referer: http://www.farmradio.org.uk/
[Sun May 03 15:14:59 2015] [error] [client 196.210.209.153] File does not exist: /usr/local/apache/htdocs/img, referer: http://www.farmradio.org.uk/
[Sun May 03 15:15:03 2015] [error] [client 196.210.209.153] File does not exist: /usr/local/apache/htdocs/img, referer: http://www.farmradio.org.uk/
[Sun May 03 15:15:46 2015] [error] [client 151.227.94.108] File does not exist: /usr/local/apache/htdocs/img, referer: http://www.farmradio.org.uk/
Title: Re: apache not reading vhost?
Post by: brijendrasial on May 03, 2015, 02:24:52 PM
There is a known bug to us that enabling nginx will cause your apache not to work as expected. You can contact your server administrator to fix it.
Title: Re: apache not reading vhost?
Post by: lee069 on May 03, 2015, 02:30:47 PM
Thanks for the reply, this server is owned by me on our company network, what do I need to do?

Regards Lee.
Title: Re: apache not reading vhost?
Post by: brijendrasial on May 03, 2015, 02:37:06 PM
Well if you dont have a server admin, I would say best possible option for you is to reinstall CWP or I think CWP team provides managed support, so you can pay them and get it.
Title: Re: apache not reading vhost?
Post by: Glenn on May 03, 2015, 02:51:27 PM
/usr/local/apache/htdocs/farmradio.xml

it looks like youre not hosting from /home/user/public_html i would try correcting the config on the server before reinstalling everything , could learn something new (-;
Title: Re: apache not reading vhost?
Post by: lee069 on May 03, 2015, 03:00:44 PM
100% agree with you about the paths but were can I set it?

Many thanks.
Title: Re: apache not reading vhost?
Post by: Glenn on May 03, 2015, 06:08:14 PM
Id start by making sure Nginx is really not installed, then delete the current user youre using ,reboot the server and re compile apache with the options you want,( from within cwp) then add a new user and see where the home folder is created , compare the path to the config in vhosts under apache in cwp , then lets see if it works.
Title: Re: apache not reading vhost?
Post by: Administrator on May 03, 2015, 10:09:26 PM
have you tried to rebuild apache vhosts ?
Title: Re: apache not reading vhost?
Post by: lee069 on May 03, 2015, 10:35:26 PM
Tried all the above but no luck. Will try a full reinstall on Tuesday.

Thanks again and fingers crossed.
Title: Re: apache not reading vhost?
Post by: lee069 on May 05, 2015, 09:17:11 AM
All working now, so I thought I'd post the fix found by CWP support.

The problem was because I was using a NAT 'ed network so the server's ip address had to be used instead of the internet one.

Many thanks to everyone for their help.

Regards Lee.
Title: Re: apache not reading vhost?
Post by: erm3nda on May 05, 2015, 07:23:22 PM
lee069

I have the same problem when deactivating nGinx. vHosts for Apache are not the same and not in the same place than vHost for nGinx.

I found a way to get it working again with few clicks, making nGinx working from scratch again.

Full disable it requires manual intervention by now.

Correct me if im wrong.
Title: Re: apache not reading vhost?
Post by: lee069 on May 09, 2015, 08:54:04 AM
Just thought I'd post the fix, it was because my server was on a NAT'ed network and the host file was setting the wrong ip address. A great tool to use (which was given to me by CWP support) is leafdns.com

Thanks to everyone for their help.

Regard Lee.