I ran a small Apache site (Redhat) for several years, having so little go wrong that I never really understood much – it just ran.
Now I have a new machine and have installed SUSE. My static IP works, and I have internet access thru Firefox. I have Apache up and running, and localhost gives me the expected “It works” message.
However, the site is not visible on the internet. Another machine tells me “Internet Explorer cannot display the webpage” and my ftp client FileZilla says “Connection established, waiting for welcome message… Could not connect to server” I am not sure if this “connection established” is a hint or not.
I have tried turning the firewall off completely; no effect.
I have run apache2ctl ckconfig and it came back OK.
I have tried it with both the Named-Based Virtual Hosting and with the basic config file… no effect.
I did find one reference to “a commonly found problem where the IP of the hostname does not match the real IP of the machine.” Without really understanding, I followed the directions, to check on this:
*ddooggssnet:~ # hostname
ddooggssnet:~ # nslookup server.ddooggssnet
** server can’t find server.ddooggssnet.bemont.net: NXDOMAIN
ddooggssnet:~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:15:17:27:61:5C
inet addr:188.8.131.52 Bcast:184.108.40.206 Mask:255.255.255.248
inet6 addr: fe80::215:17ff:fe27:615c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1314 errors:0 dropped:0 overruns:0 frame:0
TX packets:752 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:577596 (564.0 Kb) TX bytes:117810 (115.0 Kb)
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:16436 Metric:1
RX packets:7988 errors:0 dropped:0 overruns:0 frame:0
TX packets:7988 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:480540 (469.2 Kb) TX bytes:480540 (469.2 Kb)*
I readily admit that I do not understand what I am seeing here, but I think that this could be my problem – my actual static IP is 220.127.116.11 but my hostname is connected to 18.104.22.168
The website pointing me in this direction advised adding the hostname to the /et/hosts file with the command
However, this got me nowhere, as you can see:
ddooggssnet:~ # ee /etc/hosts
bash: ee: command not found
Hopefully, someone can point me in the right direction…
- Is this hostname-IP mismatch really the problem? If so, how do I go about fixing it?
- If not, what other likely causes are there?
My apologies for my limited and spotty knowledge.