Apache serves default vhost data for both sites and apache does not restart

4 posts / 0 new
Last post
#1 Tue, 06/07/2016 - 19:39
mitdrissia

Apache serves default vhost data for both sites and apache does not restart

Hi guys, i have 2 issues:

Issue 1: I have 2 domain names i want to use on my server. I create vhosts for this but when opening second website it gets the data of the first website. I have 2 separate config files.

Issue 2: When i restart apache server it just gives me the following: Restarting web server: apache2 ... waiting and then nothing happens.

How can i fix both of these?

Tue, 06/07/2016 - 21:01
andreychek

Howdy,

For the second issue, you may want to take a look at the Apache error logs in /var/log/apache2 or /var/log/httpd to see if there's any errors.

For the first issue, there could be an IP address mismatch that's causing a problem... take a peek at this article here and see if this helps:

https://www.virtualmin.com/documentation/web/troubleshooting#toc-the-wro...

Thu, 06/09/2016 - 05:40
mitdrissia

Issue1: I checked out the documentation file /sbin/ifconfig:I only have one ip address. I use only 1 ip address for multiple domains.

/sbin/ifconfig eth0 Link encap:Ethernet HWaddr 4c:72:b9:d1:cd:f1
inet addr:178.32.223.161 Bcast:178.32.223.255 Mask:255.255.255.0 inet6 addr: 2001:41d0:8:e2a1::1/128 Scope:Global inet6 addr: fe80::4e72:b9ff:fed1:cdf1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:73455064 errors:0 dropped:0 overruns:0 frame:0 TX packets:67861971 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:32724862417 (30.4 GiB) TX bytes:10121922501 (9.4 GiB) Interrupt:20 Memory:fe500000-fe520000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:36934186 errors:0 dropped:0 overruns:0 frame:0 TX packets:36934186 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4576886885 (4.2 GiB) TX bytes:4576886885 (4.2 GiB)

grep -i '<virtualhost' /etc/apache2/sites-enabled/*.conf /etc/apache2/sites-enabled/itnerd.nl.conf: /etc/apache2/sites-enabled/itnerd.tk.conf: /etc/apache2/sites-enabled/www.thememonster.nl.conf:

Yes i have 3 websites on one ip address. Is it because i did not include the above in apache2.conf?

Hi, for issue 2 i see this in error log file: errors of yesterday when doing the restart:

[Wed Jun 08 01:32:18 2016] [error] [client 66.249.64.136] Invalid method in request \x16\x03\x01 [Wed Jun 08 01:32:18 2016] [error] [client 66.249.64.136] Invalid method in request \x16\x03\x01 [Wed Jun 08 01:32:18 2016] [error] [client 66.249.64.136] Invalid method in request \x16\x03\x01 [Wed Jun 08 01:32:18 2016] [error] [client 66.249.64.136] Invalid method in request \x16\x03 [Wed Jun 08 01:36:33 2016] [error] [client 66.249.64.253] Invalid method in request \x16\x03\x01 [Wed Jun 08 01:36:33 2016] [error] [client 66.249.64.253] Invalid method in request \x16\x03\x01 [Wed Jun 08 01:36:33 2016] [error] [client 66.249.64.253] Invalid method in request \x16\x03\x01 [Wed Jun 08 01:36:33 2016] [error] [client 66.249.64.253] Invalid method in request \x16\x03 [Wed Jun 08 02:35:26 2016] [notice] caught SIGTERM, shutting down [Wed Jun 08 02:35:27 2016] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec) [Wed Jun 08 02:35:27 2016] [notice] Digest: generating secret for digest authentication ... [Wed Jun 08 02:35:27 2016] [notice] Digest: done [Wed Jun 08 02:35:27 2016] [notice] Apache/2.2.22 (Debian) DAV/2 SVN/1.6.17 mod_fcgid/2.3.6 PHP/5.4.45-0+deb7u3 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations [Wed Jun 08 02:53:33 2016] [error] [client 74.82.47.2] Invalid method in request \x16\x03\x01 [Wed Jun 08 03:02:59 2016] [notice] Graceful restart requested, doing restart [Wed Jun 08 03:03:00 2016] [notice] Digest: generating secret for digest authentication ... [Wed Jun 08 03:03:00 2016] [notice] Digest: done [Wed Jun 08 03:03:00 2016] [notice] Apache/2.2.22 (Debian) DAV/2 SVN/1.6.17 mod_fcgid/2.3.6 PHP/5.4.45-0+deb7u3 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations [Wed Jun 08 03:08:15 2016] [notice] Graceful restart requested, doing restart [Wed Jun 08 03:08:15 2016] [notice] Digest: generating secret for digest authentication ... [Wed Jun 08 03:08:15 2016] [notice] Digest: done [Wed Jun 08 03:08:15 2016] [notice] Apache/2.2.22 (Debian) DAV/2 SVN/1.6.17 mod_fcgid/2.3.6 PHP/5.4.45-0+deb7u3 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations [Wed Jun 08 03:08:16 2016] [notice] Graceful restart requested, doing restart [Wed Jun 08 03:08:16 2016] [notice] Digest: generating secret for digest authentication ... [Wed Jun 08 03:08:16 2016] [notice] Digest: done [Wed Jun 08 03:08:16 2016] [notice] Apache/2.2.22 (Debian) DAV/2 SVN/1.6.17 mod_fcgid/2.3.6 PHP/5.4.45-0+deb7u3 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations [Wed Jun 08 06:03:58 2016] These are the errors of today: [error] [client 137.116.71.170] Invalid method in request \x16\x03\x03 [error] [client 54.163.218.165] Invalid method in request \x16\x03\x01\x01O\x01 [error] [client 66.249.69.254] Invalid method in request \x16\x03\x01

Hope to hear from you soon.Thanx

Thu, 06/09/2016 - 05:57
mitdrissia

not sure why grep i does not show in comment box
> grep -i '<virtualhost' /etc/apache2/sites-enabled/*.conf
/etc/apache2/sites-enabled/itnerd.nl.conf:<VirtualHost 178.32.223.161:80 [2001:41d0:8:e2a1::1]:80>
/etc/apache2/sites-enabled/itnerd.tk.conf:<VirtualHost *:80>
/etc/apache2/sites-enabled/www.thememonster.nl.conf:<VirtualHost *:80>

Shall i send you the separate config files also?Documentroot is correct in those files.

Topic locked