# PNP4Nagios + NGinX 1.0.15 Config

**URL:** <https://www.ruby-forum.com/t/pnp4nagios-nginx-1-0-15-config/219291>\
**Category:** NGINX\
**Created:** [April 27, 2012, 5:43am UTC](https://www.ruby-forum.com/t/pnp4nagios-nginx-1-0-15-config/219291 "2012-04-27T05:43:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 27, 2012, 5:43am UTC](https://www.ruby-forum.com/t/pnp4nagios-nginx-1-0-15-config/219291/1 "2012-04-27T05:43:18Z")

</div>

Hello, i’m having a serious problem which i cant solve within 8 hours of  
debugging. I would like to use pnp4nagios (for icinga)  
I got it working under the docroot [http://1.2.3.4](http://1.2.3.4) but i want it to work  
in [http://1.2.3.4/pnp4nagios](http://1.2.3.4/pnp4nagios)

location / {  
root /usr/local/pnp4nagios/share;  
index index.html index.htm index.php;  
if (!-e $request\_filename) {  
rewrite ^/(.+)$ /index.php?kohana\_uri=$1 last;  
break;  
}  
}

location ~ .php$ {  
root /usr/local/pnp4nagios/share;  
fastcgi\_index index.php;  
fastcgi\_param SCRIPT\_FILENAME $document\_root$fastcgi\_script\_name;  
include fastcgi\_params;  
fastcgi\_pass 127.0.0.1:9000;  
}

this code works perfectly for the docroot, but i dont get it working in  
/pnp4nagios  
any help much appreciated

Posted at Nginx Forum:

> **[PNP4Nagios + NGinX 1.0.15 Config](https://forum.nginx.org/read.php?2,225851,225851#msg-225851)**
>
> Hello, i'm having a serious problem which i cant solve within 8 hours of debugging. I would like to use pnp4nagios (for icinga) I got it working under the docroot http://1.2.3.4 but i want it to work in http://1.2.3.4/pnp4nagios location / { root...
