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.
Just installed and configured my apache webserver on CentOS machine.
It was allright, I even assigned router to forward to the specific lan address and went public.
So I got that genius Idea : "Hey let's reboot and check if everything is fine after.
BANG! Can't connect to website neither with lan address nor my forwarded IP adress. It's simply GONE.
Apache service started and running (I added it to startup , but doublechecked),restarted it and what not.iptables listens on 80 , so it's ok too.
Please help I was so happy how everything ran smoothly and was about to upload my real website on the server.
Few things you can check
1. Check apache service running or not (ps ax | grep httpd)
2. Apache listening port (netstat -pnl | grep 80)
3. telnet to the port locally and remotely
4. wget to the url locally
5. Firewall rules
6. check the apache error.log
What do you mean apache is not working? is the apache service not running? or your website is not loading?
No errors and httpd.conf was configured and working. Haven't touched it.Just rebooted the pc.
As a shot in the dark, since you've checked the firewall and error logs...does your system have a static address? If not, it may have grabbed a different one from DHCP, which would explain why you can't see it at that address, and you have no errors.
Few things you can check
1. Check apache service running or not (ps ax | grep httpd)
2. Apache listening port (netstat -pnl | grep 80)
3. telnet to the port locally and remotely
4. wget to the url locally
5. Firewall rules
6. check the apache error.log
What do you mean apache is not working? is the apache service not running? or your website is not loading?
Website not loading.
1.Running
2.port 80 Listening
3.Works remo.
4.failed : No route to host ???!?!
5.All set added rules manually ,worked before the reboot , and checked them again after.
As a shot in the dark, since you've checked the firewall and error logs...does your system have a static address? If not, it may have grabbed a different one from DHCP, which would explain why you can't see it at that address, and you have no errors.
Use DHCP from my router but i bound .102 ip from it to the server machine.Also forwarded my IP to that .102 lan adress.Worked all fine before reboot , and double checked after the epic fail.
Use DHCP from my router but i bound .102 ip from it to the server machine.Also forwarded my IP to that .102 lan adress.Worked all fine before reboot , and double checked after the epic fail.
Confused about this. You say you use DHCP from your router, but you bound the .102 address FROM the router to the server??? Do you mean that you set the server to have the static address of .102, or that you did something on your router? Verify the server's IP address (the ifconfig -a command will show you). If it's not .102, you can change it and see if that resolves your immediate problem, and then we can help you modify things to always get that same address through reboots.
Quote:
Originally Posted by SAbhi
did you have a look at IPTABLES, can you post'em here ?
Read post #1 and #6, where the OP says they've already verified their IPtables rules, and that they were working correctly before the reboot.
What happens if locally via a browser on the webserver itself you type http://hostname i.e. if your machine name is web01 type http://web01
Does the webserver deliver web pages to itself.
I know you mentioned that your apache log files contain no errors on starting the service, but please restart the httpd service and post log entries that correspond with that particular time / restart. i.e. /var/log/httpd/access_log /var/log/httpd/error_log and also /var/log/messages
yeah had another look on all comments saw wget did'nt worked locally so as for http://localhost/your_web_name/some_page this too ?
this may not be a issue as you are able to telnet to the port.. but lets have a look once..
Confused about this. You say you use DHCP from your router, but you bound the .102 address FROM the router to the server??? Do you mean that you set the server to have the static address of .102, or that you did something on your router? Verify the server's IP address (the ifconfig -a command will show you). If it's not .102, you can change it and see if that resolves your immediate problem, and then we can help you modify things to always get that same address through reboots.
Read post #1 and #6, where the OP says they've already verified their IPtables rules, and that they were working correctly before the reboot.
I have set the server to always get .102 address on my lan network and then forwarded all incomming connections on my public ip adress to that local .102 addres and it worked at first.
ifconfig shows inet addr:192.168.0.102 just as it should double checked with the router connection tables and the mac of my webserver has .102 ip again all good on that field
What happens if locally via a browser on the webserver itself you type http://hostname i.e. if your machine name is web01 type http://web01
Does the webserver deliver web pages to itself.
I know you mentioned that your apache log files contain no errors on starting the service, but please restart the httpd service and post log entries that correspond with that particular time / restart. i.e. /var/log/httpd/access_log /var/log/httpd/error_log and also /var/log/messages
Regards,
Rawcous!
Code:
[Sun Mar 16 19:06:58 2014] [error] Exception KeyError: KeyError(-1215666352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Sun Mar 16 19:06:58 2014] [error] Exception KeyError: KeyError(-1215666352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Sun Mar 16 19:06:58 2014] [error] Exception KeyError: KeyError(-1215666352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Sun Mar 16 19:06:58 2014] [error] Exception KeyError: KeyError(-1215666352,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Sun Mar 16 19:06:58 2014] [notice] caught SIGTERM, shutting down
[Sun Mar 16 19:07:00 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Sun Mar 16 19:07:00 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Mar 16 19:07:00 2014] [notice] Digest: generating secret for digest authentication ...
[Sun Mar 16 19:07:00 2014] [notice] Digest: done
[Sun Mar 16 19:07:00 2014] [warn] mod_wsgi: Compiled for Python/2.6.2.
[Sun Mar 16 19:07:00 2014] [warn] mod_wsgi: Runtime using Python/2.6.6.
[Sun Mar 16 19:07:00 2014] [notice] Apache/2.2.15 (Unix) DAV/2 mod_auth_kerb/5.4 mod_nss/2.2.15 NSS/3.12.10.0 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 $
[Sun Mar 16 19:07:00 2014] [error] avahi_entry_group_add_service_strlst("localhost") failed: Invalid host name
[Sun Mar 16 19:07:00 2014] [error] avahi_entry_group_add_service_strlst("localhost") failed: Invalid host name
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.