Red HatThis forum is for the discussion of Red Hat Linux.
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.
I have installed nagios in my system and I am trying to login as http://rahul/nagios
The hostname of my system is rahul
Even I tried on other machine to connect from on the same LAN
But why the nagios page doesnt appear??
Are you serving the Nagios page through Apache/httpd? It does work when you use http://localhost/nagios right, from the server itself? Does it work using http://rahul/nagios from the server itself?
What did you add to /etc/hosts to indicate rahul as hostname? And what do you have as value for the Listen directive in httpd.conf? And did you reload network services and the httpd daemon for the changes to take effect?
Kind regards,
Eric
Last edited by EricTRA; 01-05-2013 at 09:36 AM.
Reason: restart services added...
Also check your httpd.conf file for the value of the Listen directive. If that one is set to 127.0.0.1, then of course your solution with 127.0.1.1 will not work. And you need to reload/restart the affected services to apply changes.
If you add that line to the hosts file to indicate the host rahul, it will work from that same machine. If you want it to work across the LAN then you'll need to set up each hosts file on each and every machine you want to use so that it contains all the IPs and hostnames you want to connect. Or... setup a local DNS server.
Since it's only on your LAN I would not change Apache to only listen on the 172 IP although you could do it. If the Listen directive is set to 127.0.0.1 you can change it to 0.0.0.0 to make Apache listen on all IPs on your machine.
No, it will not. All addresses in the 127/8 network bind to the loopback interface (the lo interface) and not a network interface. So you either need to set it up with a LAN IP or always access on the same box.
Same thing applies to Apache. If you set the Listen directive to an IP that binds to the loopback interface then you'll only have local access. If you set the Listen directive to 0.0.0.0 it will listen on all IP addresses configured, so if you then configure your hosts file with the LAN IP and hostname on each and every machine from which you want to connect OR setup a DNS server for your LAN, it will work. Otherwise it will only work locally.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.