http config issue - double backslashes

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Xaith_
Posts: 3
Joined: Fri Sep 27, 2013 4:02 am

http config issue - double backslashes

Post by Xaith_ »

system: fedora 17

when i click on one of the status or report links in the left side column from the nagio startup page i get the following error:

Whoops! Error: Could not read object configuration data!

when i look at any of the links i see a double backslash appended after the cgi-bin dir, such as this:

http://localhost/nagios/cgi-bin//status.cgi?host=all


i have in /etc/httpd/conf.d/nagios.conf the following lines for the dir names:

ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
<Directory "/usr/lib64/nagios/cgi-bin/">

Alias /nagios "/usr/share/nagios/html"
<Directory "/usr/share/nagios/html">

i've tried removing the trailing backslash from the "ScriptAlias" and Directiory entry but that didn't help. the double backslashes still appear.


someone point out my error or where i can make an edit to correct this? tia
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: http config issue - double backslashes

Post by lmiltchev »

Can you run the following command and show the output?

Code: Select all

grep nag /etc/group
Be sure to check out our Knowledgebase for helpful articles and solutions!
Xaith_
Posts: 3
Joined: Fri Sep 27, 2013 4:02 am

Re: http config issue - double backslashes

Post by Xaith_ »

lmiltchev wrote:Can you run the following command and show the output?

Code: Select all

grep nag /etc/group

Code: Select all

 grep nag /etc/group

nagios:x:989:
nagcmd:x:1001:nagios,apache
there it is.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: http config issue - double backslashes

Post by abrist »

Remove the trialing slash from the scriptalias:

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/lib64/nagios/cgi-bin/"
Additionally, add apache to the nagios group:

Code: Select all

usermod -a -G nagios apache
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Xaith_
Posts: 3
Joined: Fri Sep 27, 2013 4:02 am

Re: http config issue - double backslashes

Post by Xaith_ »

abrist wrote:Remove the trialing slash from the scriptalias:

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/lib64/nagios/cgi-bin/"
Additionally, add apache to the nagios group:

Code: Select all

usermod -a -G nagios apache

its working now! many thanks for the help!!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: http config issue - double backslashes

Post by tmcdonald »

Those pesky slashes :)

If all is well I'll be closing this thread. Any other issues feel free to open a new one.
Former Nagios employee
Locked