Page 2 of 4

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

Posted: Wed Jan 15, 2014 12:56 pm
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

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

Posted: Wed Jan 15, 2014 1:19 pm
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

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

Posted: Wed Jan 15, 2014 1:20 pm
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

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

Posted: Wed Jan 15, 2014 1:55 pm
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

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

Posted: Wed Jan 15, 2014 2:02 pm
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>

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

Posted: Wed Jan 15, 2014 2:42 pm
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/

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

Posted: Wed Jan 15, 2014 2:57 pm
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

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

Posted: Wed Jan 15, 2014 3:10 pm
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?

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

Posted: Wed Jan 15, 2014 3:23 pm
by vinothsethuram
ls -laR /apps/apache-httpd/ listing more than 1000 lines..

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

Posted: Wed Jan 15, 2014 4:06 pm
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.