Page 1 of 2

Apache has no VirtualHosts

Posted: Sat Jan 18, 2014 7:15 am
by heihachi88
Starting httpd: [Sat Jan 18 02:04:44 2014] [warn] NameVirtualHost 111.111.1.1:8443 has no VirtualHosts

Everytime i restart apache i am getting this warning, how to get rid of this?

Re: Apache has no VirtualHosts

Posted: Sat Jan 18, 2014 6:07 pm
by jarland
It's just because you don't have any sites with SSL on them, but Apache is configured to listen on port 8443 for SSL traffic. It's just a warning. You can ignore it, or if you have no plans for SSL you can comment out these two lines:
NameVirtualHost 111.111.1.1:8443
Listen 111.111.1.1:8443
In either /etc/httpd/conf.d/111.111.1.1.conf or /etc/apache2/conf.d/111.111.1.1.conf

Re: Apache has no VirtualHosts

Posted: Sat Jan 18, 2014 7:31 pm
by heihachi88
jarland wrote:It's just because you don't have any sites with SSL on them, but Apache is configured to listen on port 8443 for SSL traffic. It's just a warning. You can ignore it, or if you have no plans for SSL you can comment out these two lines:
NameVirtualHost 111.111.1.1:8443
Listen 111.111.1.1:8443
In either /etc/httpd/conf.d/111.111.1.1.conf or /etc/apache2/conf.d/111.111.1.1.conf
Thanks, did you commented these lines?

Re: Apache has no VirtualHosts

Posted: Sat Jan 18, 2014 7:50 pm
by jarland
Nah I left them on mine. I don't restart apache too much so it doesn't bother me. I try to hold back from tinkering too much ;)

Re: Apache has no VirtualHosts

Posted: Sat Jan 18, 2014 8:23 pm
by heihachi88
Thanks!
Do you know what might be causing:

Code: Select all

2014/01/18 14:48:45 [error] 10650#0: *109 upstream prematurely closed connection while reading response header from upstream, client: 2.133.122.19, server: domain.kz, request: "GET / HTTP/1.1", upstream: "http://145.85.26.134:8080/", host: "domain.kz", referrer: "http://domain.kz/admin/reports"
When i do clean install of Drupal 7 i am getting error 500. Only changing apache template from default to hosting then back to default solves this temporary.

Re: Apache has no VirtualHosts

Posted: Sat Jan 18, 2014 8:30 pm
by jarland
That error means that Apache closed the connection before nginx got what it needed. This can happen if Apache is restarted at the same time the request is made. However, it sounds like that isn't what is happening exactly.

Check the error log in /home/user/web/domain.tld/logs and in /var/log/httpd/error_log. Look and see if there are any other errors with identical time stamps. What we're seeing is nginx passing on it's problem, but not saying why Apache severed the connection. Hopefully the Apache logs will present the actual cause of the error.

Re: Apache has no VirtualHosts

Posted: Sat Jan 18, 2014 8:59 pm
by heihachi88
jarland wrote:That error means that Apache closed the connection before nginx got what it needed. This can happen if Apache is restarted at the same time the request is made. However, it sounds like that isn't what is happening exactly.

Check the error log in /home/user/web/domain.tld/logs and in /var/log/httpd/error_log. Look and see if there are any other errors with identical time stamps. What we're seeing is nginx passing on it's problem, but not saying why Apache severed the connection. Hopefully the Apache logs will present the actual cause of the error.
Domain error log says what i have typed before and httpd/error_log:

Code: Select all

[Sat Jan 18 01:53:39 2014] [notice] child pid 4169 exit signal Segmentation fault (11)
[Sat Jan 18 01:53:53 2014] [notice] child pid 4172 exit signal Segmentation fault (11)
[Sat Jan 18 01:53:53 2014] [notice] child pid 4175 exit signal Segmentation fault (11)
[Sat Jan 18 01:53:55 2014] [notice] child pid 4176 exit signal Segmentation fault (11)
[Sat Jan 18 01:53:55 2014] [notice] child pid 4178 exit signal Segmentation fault (11)

Re: Apache has no VirtualHosts

Posted: Sat Jan 18, 2014 10:54 pm
by jarland
Damn, you stumped me :(

Gonna try installing Drupal 7 in a few hours and see if I can reproduce the problem.

Re: Apache has no VirtualHosts

Posted: Sun Jan 19, 2014 12:48 am
by jarland
Installed drupal at http://jarland.org , fresh CentOS 6.5 with VestaCP.

Code: Select all

[Sun Jan 19 01:36:57 2014] [notice] child pid 20739 exit signal Segmentation fault (11)
[Sun Jan 19 01:36:57 2014] [notice] child pid 20740 exit signal Segmentation fault (11)
[Sun Jan 19 01:39:39 2014] [notice] child pid 20742 exit signal Segmentation fault (11)
[Sun Jan 19 01:39:40 2014] [notice] child pid 20743 exit signal Segmentation fault (11)
[Sun Jan 19 01:39:48 2014] [notice] child pid 20744 exit signal Segmentation fault (11)
So I edited /etc/php.ini and changed memory_limit to 256M. I enabled error logging for PHP. Ran "service vesta restart" and "service httpd restart" and I haven't been able to check PHP error logging because there has been no error since. Clicking all around, unable to reproduce the error thus far.

My guess is Drupal needs the memory_limit for PHP a bit higher than default.

Re: Apache has no VirtualHosts

Posted: Sun Jan 19, 2014 5:53 am
by heihachi88
jarland wrote:Installed drupal at http://jarland.org , fresh CentOS 6.5 with VestaCP.

Code: Select all

[Sun Jan 19 01:36:57 2014] [notice] child pid 20739 exit signal Segmentation fault (11)
[Sun Jan 19 01:36:57 2014] [notice] child pid 20740 exit signal Segmentation fault (11)
[Sun Jan 19 01:39:39 2014] [notice] child pid 20742 exit signal Segmentation fault (11)
[Sun Jan 19 01:39:40 2014] [notice] child pid 20743 exit signal Segmentation fault (11)
[Sun Jan 19 01:39:48 2014] [notice] child pid 20744 exit signal Segmentation fault (11)
So I edited /etc/php.ini and changed memory_limit to 256M. I enabled error logging for PHP. Ran "service vesta restart" and "service httpd restart" and I haven't been able to check PHP error logging because there has been no error since. Clicking all around, unable to reproduce the error thus far.

My guess is Drupal needs the memory_limit for PHP a bit higher than default.
I already have memory_limit 256M. Your drupal worked because you restarted vesta and apache. Try to drop all tables in DB and delete all drupal files including .htaccess and .gitignore. Then install it again from scratch without any reboots and you will see 500 internal server error.

I suspect APC in that error. Because when i install Drupal 7 only first time without any reboots it throws me an error 500, after reboot it seems to be dissapearing.