hi all,
I can't get my index.html to display on the web browser. Please point it out the reason.
this is what i had done so far:
I have registered a dns name pointing to my public ip (it is done automatic)
my server name is set same as the dns name
I have configured httpd.conf like this
ServerName http://xsoldier2006.dnsdojo.org // my dns name
DocumentRoot "/var/www/html" // i place my index.html in /var/www/html
DirectoryIndex index.html index.html.var
HostnameLookups off
I have my index.html in the /var/www/html folder
what else should i do? did i miss a step? why it is not on the browser? thanks
If your server is placed behind a router/firewall: is port 80 forwarded (destination-NAT) to port 80 on your server?
Run tcpdump on your server to see if any connection is made
While running tcpdump try to make a connection from the internet to your webserver. If there is no output, the webserver is not reachable from the internet caused by portblocking, port-80 not being forwarded or something like that.
If you're in front of the machine, open 127.0.0.1 in your browser. If apache is not running, you will get an error. If you're on the same LAN, open the host's IP in a local client's browser.
This should not be necessary.
No-ip won't help you with port 80 being blocked. At best, you can have apache listen on an alternate port.
Just to isolate the issue please disable the selinux for the meantime.
If your httpd is running the port 80 is open or any port you configure at your web server.
I don't believe SeLinux to be the problem here. I think he's trying to access his site using his registered domain name, and because port 80 is blocked by his ISP, it is not connecting.
This is why I want him to try to access the page from inside his LAN if possible.
thx for everyone trying to help. okay, this is what i tried out. Instead of working on my linux box (192.xxx.1.5), gateway is 192.xxx.1.1, I tried to host my page with the my laptop(windows xp) 192.xxx.1.10 with wampserver setup. everything worked out. (of course I had to forward port http port 80 with my router for 192.xxx.1.10)
well, if I can host with my xp box with port 80 forwarded, that i should be able to host with my linux box (192.xxx.1.5)with the same port (http)forwarded right? that means 80 is actually not blocked by my ISP right?
another concern, i have been using secure shell to login to my server to do everything i have done. it shouldn't be a problem right? I don't have to configure my httpd and things with my actualy server box right? i ask this is because when i do "lynx 127.0.0.1" it says it cannot connect to the remote host. i mean if i "lynx 127.0.0.1" ,, should it connect the local host instead???"
I am beginning to think this is less of an apache problem, but a sysadmin problem.
You still have not shown us output from your error log for apache after I told you to fix your ServerName directive, nor output from netstat showing that apache is in fact running.
You should also know, regardless of OS but from a networking standpoint, that localhost and 127.0.0.1 are 90% of the time the same thing.
You should only `chmod' the directory Apache is using. Depending on your distribution, it could be '/var/www' or the like. (I assume you're using some Debian variant.)
You also shouldn't need to `chmod' /var/www anyway... It should 'just work' as is. I assume you changed permissions to not need to edit as root.
glen,
hey i really appreciate you keep on helping all the way, thanks. yes I chmod for many directories because I felt (still feeling) so unsecured after checking my secure log. Many people trying to hack in and some actually did hack in. I have my firewall running, installed fail2ban, i really didn't know what else to do besides chmod 700 to files ... (definitely not a right way to do)... so yeah,, i changed my /var chmod 755 and apache works. thanks again for all the posts