so_cal
asked on
service httpd start syntax error in Oracle Linux 7.1 running Nagios 4.1.1
I'm trying to run service httpd start, and it's giving me an error.
/etc/init.d/httpd: line 1: '<Directory "/usr/local/nrdp>'
I'm using Oracle Linux 7.1 and running nagios 4.1.1 on VMware ESXi.
/etc/init.d/httpd: line 1: systax error near unexpected token 'newline'
/etc/init.d/httpd: line 1: '<Directory "/usr/local/nrdp>'
/etc/init.d/httpd: line 1: systax error near unexpected token 'newline'/etc/init.d/httpd: line 1: '<Directory "/usr/local/nrdp>'
I'm using Oracle Linux 7.1 and running nagios 4.1.1 on VMware ESXi.
ASKER
Yes, that's correct on the machine, I had a typo on here. Still same error.
Post the script as an inline attachment.
Did you modify it?
Try sh -v /etc/init.d/httpd
Your httpd file seems to be wrong. It needs to be a shell script not a httpd.conf like configuration file.
A Directory statement as displayed in the error does not belong in the start/stop httpd management script.
Did you modify it?
Try sh -v /etc/init.d/httpd
Your httpd file seems to be wrong. It needs to be a shell script not a httpd.conf like configuration file.
A Directory statement as displayed in the error does not belong in the start/stop httpd management script.
Can you please post the contents of /etc/init.d/httpd?
The line configuring Nagios NRPD should not be in that file, but in httpd.conf or /etc/httpd/conf.d/nrdp.con f.
HTH,
Dan
The line configuring Nagios NRPD should not be in that file, but in httpd.conf or /etc/httpd/conf.d/nrdp.con
HTH,
Dan
ASKER
[root@nagios ~]# sh -v /etc/init.d/httpd
<Directory "/usr/local/nrdp">
/etc/init.d/httpd: line 1: syntax error near unexpected token `newline'
/etc/init.d/httpd: line 1: `<Directory "/usr/local/nrdp">'
[root@nagios ~]#
ASKER
My httpd file:
<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
# Startup script for the Apache Web Server
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve
# HTML files and CGI.
# processname: httpd
# pidfile: /usr/local/apache/logs/httpd.pid
# config: /usr/local/apache/conf/httpd.conf
</Directory>
Yup, that's a directory directive. It should not be in /etc/init.d/httpd
ASKER
Okay, so do I remove the entire contents of that? Move it somewhere else?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Fantastic, thank you!
/nrdp">' instead of /nrdp>'