On a stock NNA system, it should be returning nothing on a telnet, just like the curl.
Code: Select all
[root@localhost ~]# curl 127.0.0.1 -v
* About to connect() to 127.0.0.1 port 80 (#0)
* Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basi c ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 127.0.0.1
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Wed, 16 Nov 2016 01:40:13 GMT
< Server: Apache/2.2.15 (CentOS)
< X-Powered-By: PHP/5.3.3
< Location: nagiosna/index.php
< Content-Length: 0
< Connection: close
< Content-Type: text/html; charset=UTF-8
<
* Closing connection #0
If I try to telnet to it, I get a completely blank response, but it does connect.
Now, if I modify /var/www/html/index.php, add in an echo, and add a comment to stop the redirection.
Code: Select all
<?php
#header('Location: nagiosna/index.php');
echo 'This is NNA';
?>
Code: Select all
This is NNA
Connection to host lost.
C:\Windows\System32\drivers\etc>