I'm running zoneminder-1.29.0-3.el6.x86_64 on centos 6.7 64 bit and apache is not serving any of my web pages. I got zoneminder from the zmrepo at http://zmrepo.zoneminder.com/el/6/i386/ ... noarch.rpm
I've posted this problem here in case this is being caused by zoneminder. Zoneminder is working fine but I know it dovetails into apache with the zoneminder.conf file. I have my websites set up in /etc/httpd/conf/httpd.conf and apache is starting fine.
I've run wireshark on the zoneminder machine and I can see the web page requests coming in but apache is simply not responding. It's giving nothing in response to the requests and there's nothing in the logs either. I've also checked the firewall by switching it off but it made no difference and selinux is disabled too. Could this be caused by zoneminder?
edit: apache is serving pages on my lan, but not over the internet.
apache not servig web pages
Re: apache not servig web pages
If Apache is serving pages on the lan, but not on the internet, you may have to look at your router settings and make sure you have port forwarding set up correctly.
Re: apache not servig web pages
thanks I've already verified that by running wireshark on the server. It shows the web-page requests coming in which confirms the port forwarding is working in the router. Problem is apache is just not responding to the requests from the internet.
Re: apache not servig web pages
I assume your Apache is not running on the router, but on a LAN behind it.
Port forwarding makes web requests from WAN reach your web server, but for the web server to be able to reply to the caller situated on the WAN the computer need to know a route back to the WAN, or have a default gateway setup.
Dump the routing table in the computer hosting the Apache server and check for destination = 0.0.0.0 (default gateway) - this is an example where default gateway is set to "192.168.1.1". The second row just tells the computer, for local connections use local (own) interface as gateway.
Can "ping" on the computer running Apache reach an outside address?
Traceroute will show the transiting nodes (aka routers), notice the first jump to the default gateway
Under Debian, default gateway is set in /etc/network/interfaces (unless you use DHCP addresses in which the DCHP server, often the router should be giving an appropriate default gateway):
...
iface eth0 inet static
address 192.168.1.125
netmask 255.255.255.0
gateway 192.168.1.1
...
Port forwarding makes web requests from WAN reach your web server, but for the web server to be able to reply to the caller situated on the WAN the computer need to know a route back to the WAN, or have a default gateway setup.
Dump the routing table in the computer hosting the Apache server and check for destination = 0.0.0.0 (default gateway) - this is an example where default gateway is set to "192.168.1.1". The second row just tells the computer, for local connections use local (own) interface as gateway.
Code: Select all
$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Code: Select all
$ ping www.iana.com
PING ianawww.vip.icann.org (192.0.32.8) 56(84) bytes of data.
64 bytes from www.iana.org (192.0.32.8): icmp_seq=1 ttl=240 time=175 ms
64 bytes from www.iana.org (192.0.32.8): icmp_seq=2 ttl=240 time=175 ms
64 bytes from www.iana.org (192.0.32.8): icmp_seq=3 ttl=240 time=175 ms
Code: Select all
$ traceroute www.iana.com
traceroute to www.iana.com (192.0.32.8), 30 hops max, 60 byte packets
1 192.168.1.1 (192.168.1.1) 0.265 ms 0.312 ms 0.250 ms
...
12 ae-26-26.car1.LosAngeles1.Level3.net (4.69.201.10) 174.315 ms 174.262 ms 176.021 ms
13 INTERNET-CO.car1.LosAngeles1.Level3.net (4.71.140.222) 175.323 ms 175.171 ms 175.235 ms
14 www.iana.org (192.0.32.8) 175.198 ms 175.395 ms 175.277 ms
...
iface eth0 inet static
address 192.168.1.125
netmask 255.255.255.0
gateway 192.168.1.1
...
Re: apache not servig web pages
thanks for those commands. I ran them and got wierd results, I figured my os was fubar so I wiped the machine and reinstalled from scratch and apache is now working properly.