Unable to assign SSL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
abishop
Posts: 25
Joined: Fri Dec 13, 2019 9:59 am

Unable to assign SSL

Post 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.
You do not have the required permissions to view the files attached to this post.
abishop
Posts: 25
Joined: Fri Dec 13, 2019 9:59 am

Re: Unable to assign SSL

Post 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.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Unable to assign SSL

Post 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:

Code: Select all

# httpd -t
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:

Code: Select all

# ps -ef | grep httpd
Also, please check for httpd's error under the "/var/log/httpd/" folder.

Regards,
Vinh
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to assign SSL

Post by ssax »

Locking thread, ticket received, we will continue support through the ticket.

Thank you!
Locked