Can't start nagios if apache is in custom location

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.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Can't start nagios if apache is in custom location

Post by vinothsethuram »

If I execute above command, I am getting following line in the console

cp: omitting directory ‘/etc/httpd/conf.d/nagios.conf’

Note: My apache is in custom location.. /apps/apache-http/bin
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't start nagios if apache is in custom location

Post by abrist »

A directory huh? What is the output of:

Code: Select all

ls -la /etc/httpd/conf.d/nagios.conf
cat /etc/httpd/conf.d/nagios.conf
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.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Can't start nagios if apache is in custom location

Post by vinothsethuram »

abrist wrote:A directory huh? What is the output of:

Code: Select all

ls -la /etc/httpd/conf.d/nagios.conf
cat /etc/httpd/conf.d/nagios.conf

total 12
drwxr-xr-x 2 root root 4096 Nov 25 05:27 .
drwxr-xr-x 3 root root 4096 Nov 19 16:30 ..
-rw-r--r-- 1 root root 982 Nov 25 05:27 httpd.conf


cat: /etc/httpd/conf.d/nagios.conf: Is a directory
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't start nagios if apache is in custom location

Post by abrist »

This really does not seem right, it is at least VERY far from default/standard. What is in the httpd file?

Code: Select all

cat /etc/httpd/conf.d/nagios.conf/httpd.conf
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.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Can't start nagios if apache is in custom location

Post by vinothsethuram »

abrist wrote:This really does not seem right, it is at least VERY far from default/standard. What is in the httpd file?

Code: Select all

cat /etc/httpd/conf.d/nagios.conf/httpd.conf

total 12
drwxr-xr-x 2 root root 4096 Nov 25 05:27 .
drwxr-xr-x 3 root root 4096 Nov 19 16:30 ..
-rw-r--r-- 1 root root 982 Nov 25 05:27 httpd.conf
vinoth@velocitylinux:~$ ^C
vinoth@velocitylinux:~$ cat /etc/httpd/conf.d/nagios.conf
cat: /etc/httpd/conf.d/nagios.conf: Is a directory
vinoth@velocitylinux:~$ ^C
vinoth@velocitylinux:~$ cat /etc/httpd/conf.d/nagios.conf/httpd.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't start nagios if apache is in custom location

Post by abrist »

I have no idea if apache can handle the vhost conf as a directory. Do you have other vhost files located at:

Code: Select all

ls -laR /apps/apache-http/
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.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Can't start nagios if apache is in custom location

Post by vinothsethuram »

abrist wrote:I have no idea if apache can handle the vhost conf as a directory. Do you have other vhost files located at:

Code: Select all

ls -laR /apps/apache-http/

vinoth@velocitylinux:~$ sudo ls -laR /apps/apache-http/
ls: cannot access /apps/apache-http/: No such file or directory
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Can't start nagios if apache is in custom location

Post by abrist »

vinothsethuram wrote:Note: My apache is in custom location.. /apps/apache-http/bin
vinothsethuram wrote:vinoth@velocitylinux:~$ sudo ls -laR /apps/apache-http/
ls: cannot access /apps/apache-http/: No such file or directory
Well, where is it?
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.
vinothsethuram
Posts: 147
Joined: Thu Nov 07, 2013 11:44 am

Re: Can't start nagios if apache is in custom location

Post by vinothsethuram »

ls -laR /apps/apache-httpd/ listing more than 1000 lines..
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Can't start nagios if apache is in custom location

Post by slansing »

Okay:
ls: cannot access /apps/apache-http/: No such file or directory
This indicates you can't access the directory, yet you said it is outputting over 1000 files in that directory? How can that be? We need solid answers so we can work towards a solution with you.

Edit: difference in pathing.
Locked