Page 2 of 2
Re: NRDP send command
Posted: Fri Aug 29, 2014 2:12 pm
by tmcdonald
As for displaying the source code, you probably have short tags disabled in your php. Try changing the first line of /usr/local/nrdp/clients/send_nrdp.php from this:
to this:
and re-run it. Or just enable short-tags in your php config:
http://stackoverflow.com/questions/2185 ... short-tags
Re: NRDP send command
Posted: Mon Sep 01, 2014 3:59 am
by tariqondego
Thanks,its not displaying source code anymore after making that change.
I also checked /var/log/apache2/error.log and found this error:
Code: Select all
[Mon Sep 01 07:37:39.760883 2014] [authz_core:error] [pid 16670] [client 172.16.111.7:41908] AH01630: client denied by server configuration: /usr/local/nrdp/server/
So I changed the /etc/apache2/conf.d/nrdp.conf file to allow access to /usr/local/nrdp/server/
Code: Select all
<Directory "/usr/local/nrdp">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "NRDP"
# AuthType Basic
AuthUserFile /usr/local/nrdp/htpasswd.users
Require valid-user
</Directory>
Alias /nrdp "/usr/local/nrdp/server"
<Directory /usr/local/nrdp/server>
Order allow,deny
Allow from all
</Directory>
I also changed permission of /usr/local/nrdp/server
Code: Select all
drwxrw-rw- 4 nagios nagios 4096 Ful 1 05:50 server
But i still get error
Code: Select all
[Mon Sep 01 07:37:39.760883 2014] [authz_core:error] [pid 16670] [client 172.16.111.7:41908] AH01630: client denied by server configuration: /usr/local/nrdp/server/
I am using apache 2.4.7
Please advise.
Re: NRDP send command
Posted: Wed Sep 03, 2014 4:15 pm
by tmcdonald
Try putting the basic auth in front of the URL like so:
Code: Select all
--url=username:password@http://192.168.1.5/nrdp
using whatever you would use to log in to your Nagios Core web interface.
Re: NRDP send command
Posted: Wed Sep 10, 2014 5:21 am
by tariqondego
I get below error when i try that:
Code: Select all
PHP Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /usr/local/nrdp/clients/send_nrdp.php on line 368
PHP Warning: fsockopen(): unable to connect to :80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /usr/local/nrdp/clients/send_nrdp.php on line 368
Please advise
Re: NRDP send command
Posted: Thu Sep 11, 2014 5:18 pm
by tmcdonald
Is it required that you have basic authentication on your NRDP directory? That seems to be the issue here and if it is not needed the script should work with the normal
http://192.168.1.5/nrdp address.