Page 1 of 1
Unable to assign SSL
Posted: Wed Jan 06, 2021 5:42 pm
by abishop
I am trying to assign a SSL certificate with my Nagios Server. I have followed the directions in
https://assets.nagios.com/downloads/nag ... s%20XI.pdf
but I get an error.
I took a screen shot of the error. Please see the attached image.
Thank you for your help.
Re: Unable to assign SSL
Posted: Thu Jan 07, 2021 11:22 am
by abishop
So trying again this morning and I was able to get passed that part. Now I am stuck with restarting the httpd
[root@coanagiosxi certs]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
[root@coanagiosxi certs]# Job for httpd.service failed because the control proce ss exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
-bash: Job: command not found
[root@coanagiosxi certs]# ^C
[root@coanagiosxi certs]# ^C
[root@coanagiosxi certs]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset : disabled)
Active: failed (Result: exit-code) since Thu 2021-01-07 10:00:26 CST; 1min 38 s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 97149 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAI LURE)
Process: 97148 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, s tatus=1/FAILURE)
Main PID: 97148 (code=exited, status=1/FAILURE)
Jan 07 10:00:25 coanagiosxi.alton.city.hall systemd[1]: Stopped The Apache HT...
Jan 07 10:00:25 coanagiosxi.alton.city.hall systemd[1]: Starting The Apache H...
Jan 07 10:00:26 coanagiosxi.alton.city.hall httpd[97148]: httpd: Syntax error...
Jan 07 10:00:26 coanagiosxi.alton.city.hall systemd[1]: httpd.service: main p...
Jan 07 10:00:26 coanagiosxi.alton.city.hall kill[97149]: kill: cannot find pr...
Jan 07 10:00:26 coanagiosxi.alton.city.hall systemd[1]: httpd.service: contro...
Jan 07 10:00:26 coanagiosxi.alton.city.hall systemd[1]: Failed to start The A...
Jan 07 10:00:26 coanagiosxi.alton.city.hall systemd[1]: Unit httpd.service en...
Jan 07 10:00:26 coanagiosxi.alton.city.hall systemd[1]: httpd.service failed.
Re: Unable to assign SSL
Posted: Thu Jan 07, 2021 3:14 pm
by vtrac
Hi abishop,
Please make sure that you added the following two lines to the "/etc/httpd/conf.d/nagiosxi.conf" file.
Code: Select all
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Here's an example:
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
Run syntax tests for configuration files only:
Based on the error provided, your "kill" command came back with the "status=1" (FAILURE) below tells me that not all "httpd" daemons are killed.
Code: Select all
Process: 97149 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAI LURE)
Can you please check and see if "httpd" daemons are still running:
Also, please check for httpd's error under the "/var/log/httpd/" folder.
Regards,
Vinh
Re: Unable to assign SSL
Posted: Fri Jan 08, 2021 10:59 am
by ssax
Locking thread, ticket received, we will continue support through the ticket.
Thank you!