Hi,
i've got a Problem with the Configuration of the Apache2 with SSL for the Webinterface of Nagios 3.4.1. I've tryed many of the Results from Google but nothing works... Maybe i'm too stupid.
Can anyone help me, what i have to do?
Thanks.
Sorry for my bad english.
SSL Webinterface on Nagios3/Debian 7.6
Re: SSL Webinterface on Nagios3/Debian 7.6
Start by posting the apache vhost config for the nagios vhost. It is usually located at:
Code: Select all
/etc/httpd/conf.d/nagios.confFormer 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.
"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.
Re: SSL Webinterface on Nagios3/Debian 7.6
I think you mean this one?
Code: Select all
# apache configuration for nagios 3.x
# note to users of nagios 1.x and 2.x:
# throughout this file are commented out sections which preserve
# backwards compatibility with bookmarks/config for older nagios versios.
# simply look for lines following "nagios 1.x:" and "nagios 2.x" comments.
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
# nagios 1.x:
ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios3
# nagios 2.x:
#ScriptAlias /cgi-bin/nagios2 /usr/lib/cgi-bin/nagios3
#ScriptAlias /nagios2/cgi-bin /usr/lib/cgi-bin/nagios3
# Where the stylesheets (config files) reside
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
# nagios 1.x:
#Alias /nagios/stylesheets /etc/nagios3/stylesheets
# nagios 2.x:
#Alias /nagios2/stylesheets /etc/nagios3/stylesheets
# Where the HTML pages live
Alias /nagios3 /usr/share/nagios3/htdocs
# nagios 2.x:
#Alias /nagios2 /usr/share/nagios3/htdocs
# nagios 1.x:
#Alias /nagios /usr/share/nagios3/htdocs
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3/stylesheets)>
Options FollowSymLinks
DirectoryIndex index.php index.html
AllowOverride AuthConfig
Order Allow,Deny
Allow From All
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios3/htpasswd.users
# nagios 1.x:
#AuthUserFile /etc/nagios/htpasswd.users
require valid-user
</DirectoryMatch>
<Directory /usr/share/nagios3/htdocs>
Options +ExecCGI
</Directory>
# Enable this ScriptAlias if you want to enable the grouplist patch.
# See http://apan.sourceforge.net/download.html for more info
# It allows you to see a clickable list of all hostgroups in the
# left pane of the Nagios web interface
# XXX This is not tested for nagios 2.x use at your own peril
#ScriptAlias /nagios3/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgi
# nagios 1.x:
#ScriptAlias /nagios/side.html /usr/lib/cgi-bin/nagios3/grouplist.cgiRe: SSL Webinterface on Nagios3/Debian 7.6
I don't see any mention of ssl in the vhost file. How are you enabling ssl? Through the default ssl vhost file, through httpd.conf, or some other mechanism?
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.
"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.
Re: SSL Webinterface on Nagios3/Debian 7.6
I removed the SSL entries from the "nagios.conf" file because it did not work. I was searching on Google for a general guide to it then try. Maybe you can tell me what changes I need to make. Thank you.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: SSL Webinterface on Nagios3/Debian 7.6
To quote the debian handbook:
Once that's done, you will need to make a new vhost for nagios listening on :443 with all the same settings as your port 80 vhost is set for currently. A basic vhost config for both ports can be found: https://github.com/sreinhardt/Docker-Te ... sting.conf
Restart apache2 and ideally should be all set! Of course iptables, or debian vs centos differences may apply.
That said, here is a basic ssl configuration file that will need to be enabled and possibly configured a bit, mostly ssl cert paths, since it is from CentOS land: https://github.com/sreinhardt/Docker-Te ... d/ssl.confApache 2.2 includes the SSL module required for secure HTTP (HTTPS) out of the box. It just needs to be enabled with a2enmod ssl, then the required directives have to be added to the configuration files. A configuration example is provided in /usr/share/doc/apache2.2-common/examples/apache2/extra/httpd-ssl.conf.gz.
→ http://httpd.apache.org/docs/2.2/mod/mod_ssl.html
Once that's done, you will need to make a new vhost for nagios listening on :443 with all the same settings as your port 80 vhost is set for currently. A basic vhost config for both ports can be found: https://github.com/sreinhardt/Docker-Te ... sting.conf
Restart apache2 and ideally should be all set! Of course iptables, or debian vs centos differences may apply.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: SSL Webinterface on Nagios3/Debian 7.6
Thanks, I'll try it and then report.
Re: SSL Webinterface on Nagios3/Debian 7.6
It runs. Thank you.