# Running nagios on nginx -- I guess I need a cgi wrapper, any recommendations?

**URL:** <https://www.ruby-forum.com/t/running-nagios-on-nginx-i-guess-i-need-a-cgi-wrapper-any-recommendations/195931>\
**Category:** NGINX\
**Created:** [October 3, 2010, 7:00am UTC](https://www.ruby-forum.com/t/running-nagios-on-nginx-i-guess-i-need-a-cgi-wrapper-any-recommendations/195931 "2010-10-03T07:00:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [October 3, 2010, 7:00am UTC](https://www.ruby-forum.com/t/running-nagios-on-nginx-i-guess-i-need-a-cgi-wrapper-any-recommendations/195931/1 "2010-10-03T07:00:32Z")

</div>

Hi All,

I didn’t realize that I needed a CGI wrapper for the nagios CGI scripts,  
oops…

found this article:

[http://www.matejunkie.com/howto-let-nginx-serve-the-nagios-web-interface/](http://www.matejunkie.com/howto-let-nginx-serve-the-nagios-web-interface/)

Before I go this route, any better / easier suggestions /  
recommendations?

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [October 3, 2010, 1:07pm UTC](https://www.ruby-forum.com/t/running-nagios-on-nginx-i-guess-i-need-a-cgi-wrapper-any-recommendations/195931/2 "2010-10-03T13:07:28Z")

</div>

On Sun, 3 Oct 2010 00:59:34 -0400, Ilan B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi All,
> 
> I didn’t realize that I needed a CGI wrapper for the nagios CGI scripts, oops…
> 
> found this article:
> 
> [http://www.matejunkie.com/howto-let-nginx-serve-the-nagios-web-interface/](http://www.matejunkie.com/howto-let-nginx-serve-the-nagios-web-interface/) [1]
> 
> Before I go this route, any better / easier suggestions / recommendations? !DSPAM:4ca80de8110851118274457!

Hi,  
I did it with fcgiwrap a while ago.  
Sorry, the setup is in french, but it might help:  
[http://wiki.linuxwall.info/doku.php/fr:ressources:dossiers:supervision:nagios3?s[]=nagios#configurer\_nginx](http://wiki.linuxwall.info/doku.php/fr:ressources:dossiers:supervision:nagios3?s%5B%5D=nagios#configurer_nginx)

Julien

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [October 3, 2010, 3:45pm UTC](https://www.ruby-forum.com/t/running-nagios-on-nginx-i-guess-i-need-a-cgi-wrapper-any-recommendations/195931/3 "2010-10-03T15:45:29Z")

</div>

I got it working, thanks!

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [October 3, 2010, 5:34pm UTC](https://www.ruby-forum.com/t/running-nagios-on-nginx-i-guess-i-need-a-cgi-wrapper-any-recommendations/195931/4 "2010-10-03T17:34:56Z")

</div>

I’m happy to say that fcgiwrap has been packaged for Debian sid/squeeze  
and will be in Ubuntu 10.10 as well.

## iberkner Wrote:

> for the nagios CGI scripts,  
> suggestions /  
> dossiers:supervision:nagios3?s=nagios#configurer  
> \_nginx
> 
> > Julien

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,136478,136567#msg-136567](http://forum.nginx.org/read.php?2,136478,136567#msg-136567)

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [October 3, 2010, 8:10pm UTC](https://www.ruby-forum.com/t/running-nagios-on-nginx-i-guess-i-need-a-cgi-wrapper-any-recommendations/195931/5 "2010-10-03T20:10:38Z")

</div>

On Sun, 2010-10-03 at 00:59 -0400, Ilan B. wrote:

> Hi All,
> 
> I didn’t realize that I needed a CGI wrapper for the nagios CGI  
> scripts, oops…

When I am forced to run CGI, I usually choose one of the tiny HTTP  
servers such as thttpd (see [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/ThttpdCGI)) and proxy  
to it from Nginx. This keeps the memory footprint small (no Apache  
required) and still lets me used the more advanced features of Nginx for  
non-CGI tasks.

Cliff

–

---

<div class="post-metadata">

**Author:** ![iberci](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a3d4f5/32.png) [@iberci](https://www.ruby-forum.com/u/iberci)\
**Post date:** [October 4, 2010, 10:40am UTC](https://www.ruby-forum.com/t/running-nagios-on-nginx-i-guess-i-need-a-cgi-wrapper-any-recommendations/195931/6 "2010-10-04T10:40:11Z")

</div>

On nie, paÅº 03, 2010 at 11:09:28 -0700, Cliff W. wrote:

> When I am forced to run CGI, I usually choose one of the tiny HTTP  
> servers such as thttpd (see [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/ThttpdCGI)) and proxy  
> to it from Nginx. This keeps the memory footprint small (no Apache  
> required) and still lets me used the more advanced features of Nginx for  
> non-CGI tasks.

I’m not exactly sure you can go much lighter than fcgiwrap (especially  
with several instances running, the per-process overhead is minimal –  
84 KB last time I checked on i386).

Best regards,  
Grzegorz N.
