Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Now is the time to look at the logs, and what happens when the url for domain1 isn't found
I took a look and I'm not really sure what the hits are but I do notice that sometimes, it's trying to go to /var/www/domain1/blog. That's obviously an issue as that path doesn't exist, it's like apache has crossed wires or something. Here is the error log output from domain1:
Code:
[Sun Jun 21 15:15:52 2009] [error] [client 61.160.216.63] script '/var/www/domain1/prx.php' not found or unable to stat
[Sun Jun 21 15:42:56 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/favicon.ico
[Sun Jun 21 15:42:59 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/favicon.ico
[Sun Jun 21 16:02:01 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/blog
[Sun Jun 21 16:02:10 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/blog
[Sun Jun 21 17:45:47 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/blog
[Sun Jun 21 18:12:58 2009] [error] [client 65.55.106.140] File does not exist: /var/www/domain1/robots.txt
[Sun Jun 21 20:21:26 2009] [error] [client 123.125.64.13] File does not exist: /var/www/domain1/robots.txt
[Sun Jun 21 23:21:06 2009] [error] [client 65.55.106.231] File does not exist: /var/www/domain1/robots.txt
[Sun Jun 21 23:59:41 2009] [error] [client 72.30.79.107] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 04:26:27 2009] [error] [client 65.55.106.234] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 04:45:53 2009] [error] [client 67.16.94.2] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 06:19:25 2009] [error] [client 64.88.164.198] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 07:51:19 2009] [error] [client 38.99.44.105] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 08:32:22 2009] [error] [client 75.8.17.102] File does not exist: /var/www/domain1/favicon.ico
[Mon Jun 22 09:34:06 2009] [error] [client 65.55.106.120] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 10:40:23 2009] [error] [client 98.213.195.212] File does not exist: /var/www/domain1/favicon.ico
[Mon Jun 22 13:48:07 2009] [error] [client 67.52.197.34] File does not exist: /var/www/domain1/favicon.ico
[Mon Jun 22 14:40:57 2009] [error] [client 65.55.106.230] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 15:14:35 2009] [error] [client 123.125.66.51] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 18:14:33 2009] [error] [client 66.249.71.143] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 19:14:32 2009] [error] [client 202.160.178.105] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 20:40:07 2009] [error] [client 65.55.106.141] File does not exist: /var/www/domain1/robots.txt
[Mon Jun 22 20:50:45 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/favicon.ico
[Mon Jun 22 20:50:48 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/favicon.ico
[Mon Jun 22 21:05:23 2009] [error] [client 72.69.95.159] File does not exist: /var/www/domain1/mail
[Mon Jun 22 21:06:21 2009] [error] [client 72.69.95.159] File does not exist: /var/www/domain1/mail
[Mon Jun 22 21:53:43 2009] [error] [client 86.107.249.78] File does not exist: /var/www/domain1/phpMyAdmin
[Mon Jun 22 21:53:50 2009] [error] [client 86.107.249.78] File does not exist: /var/www/domain1/admin
[Mon Jun 22 21:53:50 2009] [error] [client 86.107.249.78] File does not exist: /var/www/domain1/dbadmin
[Mon Jun 22 21:53:53 2009] [error] [client 86.107.249.78] File does not exist: /var/www/domain1/php-my-admin
[Mon Jun 22 21:53:54 2009] [error] [client 86.107.249.78] File does not exist: /var/www/domain1/myadmin
[Mon Jun 22 21:53:54 2009] [error] [client 86.107.249.78] File does not exist: /var/www/domain1/PHPMYADMIN
[Tue Jun 23 01:28:27 2009] [error] [client 65.55.106.121] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 02:09:05 2009] [error] [client 65.55.232.14] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 06:37:03 2009] [error] [client 65.55.106.242] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 08:32:43 2009] [error] [client 38.99.44.105] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 09:19:07 2009] [error] [client 64.88.164.198] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 10:11:35 2009] [error] [client 88.57.106.93] File does not exist: /var/www/domain1/favicon.ico
[Tue Jun 23 10:11:38 2009] [error] [client 88.57.106.93] File does not exist: /var/www/domain1/favicon.ico
[Tue Jun 23 11:04:43 2009] [error] [client 64.129.21.125] File does not exist: /var/www/domain1/favicon.ico
[Tue Jun 23 11:09:23 2009] [error] [client 98.213.240.144] File does not exist: /var/www/domain1/favicon.ico
[Tue Jun 23 11:52:52 2009] [error] [client 65.55.106.148] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 12:28:30 2009] [error] [client 83.167.62.180] File does not exist: /var/www/domain1/robots.txt, referer: http://www.exalead.com/
[Tue Jun 23 13:34:40 2009] [error] [client 65.125.111.3] File does not exist: /var/www/domain1/favicon.ico
[Tue Jun 23 14:00:22 2009] [error] [client 83.167.62.180] File does not exist: /var/www/domain1/robots.txt, referer: http://www.exalead.com/
[Tue Jun 23 15:40:12 2009] [error] [client 216.163.188.208] File does not exist: /var/www/domain1/favicon.ico
[Tue Jun 23 15:57:47 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/favicon.ico
[Tue Jun 23 15:57:50 2009] [error] [client 192.168.10.1] File does not exist: /var/www/domain1/favicon.ico
[Tue Jun 23 16:29:20 2009] [error] [client 77.88.30.247] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 16:54:20 2009] [error] [client 65.55.106.220] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 20:17:26 2009] [error] [client 38.100.8.50] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 22:00:41 2009] [error] [client 65.55.106.182] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 22:09:50 2009] [error] [client 71.41.201.38] File does not exist: /var/www/domain1/robots.txt
[Tue Jun 23 22:13:44 2009] [error] [client 66.249.71.242] File does not exist: /var/www/domain1/robots.txt
[Wed Jun 24 01:35:18 2009] [error] [client 62.212.132.78] File does not exist: /var/www/domain1/phpMyAdmin
[Wed Jun 24 01:35:21 2009] [error] [client 62.212.132.78] File does not exist: /var/www/domain1/pma
[Wed Jun 24 01:35:22 2009] [error] [client 62.212.132.78] File does not exist: /var/www/domain1/admin
[Wed Jun 24 01:35:22 2009] [error] [client 62.212.132.78] File does not exist: /var/www/domain1/dbadmin
[Wed Jun 24 01:35:22 2009] [error] [client 62.212.132.78] File does not exist: /var/www/domain1/mysql
[Wed Jun 24 01:35:22 2009] [error] [client 62.212.132.78] File does not exist: /var/www/domain1/php-my-admin
[Wed Jun 24 01:35:23 2009] [error] [client 62.212.132.78] File does not exist: /var/www/domain1/myadmin
[Wed Jun 24 01:35:23 2009] [error] [client 62.212.132.78] File does not exist: /var/www/domain1/PHPMYADMIN
[Wed Jun 24 02:13:12 2009] [error] [client 61.160.217.89] File does not exist: /var/www/domain1/cgi-bin
[Wed Jun 24 03:03:50 2009] [error] [client 65.55.106.124] File does not exist: /var/www/domain1/robots.txt
[Wed Jun 24 06:52:52 2009] [error] [client 208.96.54.76] File does not exist: /var/www/domain1/robots.txt
[Wed Jun 24 08:09:02 2009] [error] [client 65.55.106.230] File does not exist: /var/www/domain1/robots.txt
[Wed Jun 24 09:03:38 2009] [error] [client 38.99.44.105] File does not exist: /var/www/domain1/robots.txt
[Wed Jun 24 09:31:46 2009] [error] [client 64.246.178.34] File does not exist: /var/www/domain1/robots.txt, referer: http://www.whois.sc/
[Wed Jun 24 12:31:27 2009] [error] [client 216.173.60.162] File does not exist: /var/www/domain1/favicon.ico
[Wed Jun 24 12:31:27 2009] [error] [client 216.173.60.162] File does not exist: /var/www/domain1/favicon.ico
[Wed Jun 24 12:42:34 2009] [error] [client 192.168.10.1] File does not exist: /htdocs
[Wed Jun 24 12:42:43 2009] [error] [client 10.0.0.11] File does not exist: /htdocs
[Wed Jun 24 12:42:43 2009] [error] [client 192.168.10.75] File does not exist: /htdocs, referer: http://blog.baerconsult.com/
[Wed Jun 24 12:42:43 2009] [error] [client 192.168.10.75] File does not exist: /htdocs, referer: http://blog.baerconsult.com/
[Wed Jun 24 12:43:11 2009] [error] [client 192.168.10.1] File does not exist: /htdocs
[Wed Jun 24 12:43:11 2009] [error] [client 192.168.10.1] File does not exist: /htdocs
[Wed Jun 24 12:43:25 2009] [error] [client 192.168.10.75] File does not exist: /htdocs, referer: http://blog.baerconsult.com/
[Wed Jun 24 12:43:25 2009] [error] [client 192.168.10.75] File does not exist: /htdocs, referer: http://blog.baerconsult.com/
[Wed Jun 24 12:43:30 2009] [error] [client 192.168.10.1] File does not exist: /htdocs
[Wed Jun 24 12:43:41 2009] [error] [client 192.168.10.1] File does not exist: /htdocs
[Wed Jun 24 12:43:41 2009] [error] [client 192.168.10.1] File does not exist: /htdocs
[Wed Jun 24 12:50:27 2009] [error] [client 192.168.10.1] File does not exist: /htdocs
[Wed Jun 24 12:50:32 2009] [error] [client 10.0.0.11] File does not exist: /htdocs
[Wed Jun 24 12:50:33 2009] [error] [client 192.168.10.75] File does not exist: /htdocs, referer: http://blog.baerconsult.com/
[Wed Jun 24 12:50:33 2009] [error] [client 192.168.10.75] File does not exist: /htdocs, referer: http://blog.baerconsult.com/
[Wed Jun 24 13:24:12 2009] [error] [client 65.55.106.232] File does not exist: /var/www/domain1/robots.txt
[Wed Jun 24 13:38:14 2009] [error] [client 75.149.79.49] File does not exist: /var/www/domain1/favicon.ico
[Wed Jun 24 13:38:18 2009] [error] [client 75.149.79.49] File does not exist: /var/www/domain1/favicon.ico
Error log domain2:
Code:
[Sun Jun 21 14:48:52 2009] [error] [client 10.0.0.11] File does not exist: /var/www/blog/blog
[Sun Jun 21 14:49:17 2009] [error] [client 192.168.10.101] File does not exist: /var/www/blog/blog, referer: http://domain1.com/
[Sun Jun 21 14:49:18 2009] [error] [client 192.168.10.101] File does not exist: /var/www/blog/blog, referer: http://domain1.com/
[Sun Jun 21 17:08:03 2009] [error] [client 10.0.0.11] File does not exist: /var/www/blog/blog
[Sun Jun 21 17:08:24 2009] [error] [client 192.168.10.101] File does not exist: /var/www/blog/blog, referer: http://domain1.com/
[Sun Jun 21 17:08:24 2009] [error] [client 192.168.10.101] File does not exist: /var/www/blog/blog, referer: http://domain1.com/
[Sun Jun 21 17:09:37 2009] [error] [client 10.0.0.11] File does not exist: /var/www/blog/blog
[Sun Jun 21 17:09:37 2009] [error] [client 192.168.10.101] File does not exist: /var/www/blog/blog, referer: http://domain1.com/
[Sun Jun 21 17:09:37 2009] [error] [client 192.168.10.101] File does not exist: /var/www/blog/blog, referer: http://domain1.com/
I won't do the access log for them as LQ doesn't like the length and I think the error is obvious in the path. The problem is, I don't know how to fix it. If needed, I can post the access logs as attachments I suppose.
My guess would be that you have some spurious config files somewhere that are being seen. Does Debian set up aliases somewhere?
What does "httpd -S" give you (may be apache2 on Deb??)
Code:
w3badm1n@webserv:/var/www/logs$ httpd -S
-bash: httpd: command not found
w3badm1n@webserv:/var/www/logs$ apache2 -S
apache2: bad user name ${APACHE_RUN_USER}
w3badm1n@webserv:/var/www/logs$
[Wed Jun 24 17:49:02 2009] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
[Wed Jun 24 17:49:03 2009] [warn] NameVirtualHost PUBLIC IP:80 has no VirtualHosts
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:* domain1.com (/etc/apache2/sites-enabled/vhost:6)
*:* blog.domain2.com (/etc/apache2/sites-enabled/vhost:16)
Syntax OK
[Wed Jun 24 17:49:02 2009] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
[Wed Jun 24 17:49:03 2009] [warn] NameVirtualHost PUBLIC IP:80 has no VirtualHosts
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:* domain1.com (/etc/apache2/sites-enabled/vhost:6)
*:* blog.domain2.com (/etc/apache2/sites-enabled/vhost:16)
Syntax OK
It was sudo apache2ctl -S
So here's what I did. Edited the host file on the server to reflect:
Code:
internal IP domain1.com blog.domain2.com
I guess I must've missed that or assumed they were referring to something for testing.
I also went in to the apache2.conf file and added:
Code:
ServerName internal IP
And restarted apache. Now when I make a request for the respective domain, I go to the respective web site! W00T
Now I have a problem with Wordpress displaying properly. Probably not an issue for this forum but perhaps someone knows something. It looks like there's no PHP possibly going on there. It just looks like a really crappy website.
It's all fixed. I had to add "ServerName (private IP of the server)" to apache2.conf and then edit the host files with the private IP and domains. Guess I don't really know the significance of the hosts file. On top of that, the tutorials only mentioned it when you don't have DNS A records and need to test that it's working. At any rate, each domain goes to its respective website. Thank you all for your help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.