-2

I have setup nagios on my Ubuntu, but when I go to my IP address, it downloads a BIN file. Why is this happening? The address is:

http://46.101.145.158/nagios

  • Hard to tell. What’d you do? – Jeff Schaller Oct 30 '17 at 12:57
  • I just setup setup nagios into Ubuntu 16.04 Digital Ocean Linux – School Of Freelancing Oct 30 '17 at 13:03
4

You appear to be running an ssh server on your http/https ports:

nc -vvv 46.101.145.158 80
Connection to 46.101.145.158 80 port [tcp/http] succeeded!
SSH-2.0-dropbear_2016.72

nc -vvv 46.101.145.158 443
Connection to 46.101.145.158 443 port [tcp/http] succeeded!
SSH-2.0-dropbear_2016.72

If you're trying to run ssh and http/https on the same port I would strongly recommend that you keep things simple until you have all your services working correctly, and instead (at least for now) separate them out.

You can then start to investigate the problem that you have described, knowing that you have just a single application (i.e. your webserver) to consider.

|improve this answer|||||
  • is their any command which will solve my all problem? I have every thing as you said! – School Of Freelancing Oct 30 '17 at 15:34
  • 1
    @SchoolOfFreelancing I assume you followed a tutorial/guide to set up your system. If you update your question to provide a link to it we might be able to offer practical advice. – roaima Oct 30 '17 at 16:25
1

Something in your Web server configuration is broken, as here's what curl says...

imac> curl -I -L http://46.101.145.158/nagios
curl: (8) Weird server reply

First time I've ever seen this type of response. Same for your raw IP...

imac> curl -I -L http://46.101.145.158
curl: (8) Weird server reply

Start with your Web server logs.

Also, thinking through this, a misconfigured iptables rule to attempt dealing with some types of attack traffic might be at fault, so if you have any iptables rules associated with port 80 on this IP, flush the related rules for now.

Likely your Webserver access + error logs will help.

Get your actual Webserver working first... so serving a simple index.html first, before attempting to setup anything complex.

|improve this answer|||||
  • is their any command which will solve my all problem? I have every thing as you said! – School Of Freelancing Oct 30 '17 at 15:34
  • Yes. You'll require configuring your system to do deep logging for your entire Web stack (whatever you're running - Apache + PHP + etc...), then get into your logs (tail -f /path-to-log) + visit your site. Once you've fixed all Apache log errors, move on to PHP or whatever else you're running + fix every problem logged. – David Favor Nov 1 '17 at 12:59
  • Reading curl docs, this may indicate your Web server is forcing ftp: rather than http: for the protocol... which truly is... weird... Your Web server logs should tell you all you require for debugging this problem. – David Favor Nov 1 '17 at 13:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.