Welcome! Log In Create A New Profile

Advanced

Re: what's the simplest way to serve php files through an alias?

October 03, 2010 12:34AM
Thanks for the advice. When I do it this way, I get an error (nginx error
log):

2010/10/03 00:27:33 [error] 20239#0: *6447
"/usr/local/nagios/share/nagios/index.php" is not found (2: No such file or
directory)

so you can see that nginx is adding /nagios/ to the end of the root
directory and so the file is not found (generating a 404 on the browser).

What would be the correct way to address this issue?



On Sat, Oct 2, 2010 at 9:03 PM, Edho P Arief <edhoprima@gmail.com> wrote:

> On Sun, Oct 3, 2010 at 7:23 AM, Ilan Berkner <iberkner@gmail.com> wrote:
> > Thanks,
> > I tried it using "root" in the location, still no luck.
> > Here's my config (the parts that matter), the location /nagios/ is what's
> > not working. What am I doing wrong? Thanks
>
> "not working"?
>
> - What are you expecting?
> - What are you getting?
>
> > http
> > {
> > root /var/www/html;
> > server
> > {
> > listen 10.0.1.163;
> > server_name dev.testsite.com;
> > location /nagios/
> > {
> > root /usr/local/nagios/share;
> > index index.php;
> > }
>
> as this one is located in different root path, you need additional php
> block
>
> location ~ ^/nagios/.*\.php$ {
> ...
> }
>
> --
> O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

what's the simplest way to serve php files through an alias?

iberkner October 02, 2010 07:10PM

Re: what's the simplest way to serve php files through an alias?

António P. P. Almeida October 02, 2010 07:36PM

Re: what's the simplest way to serve php files through an alias?

iberkner October 02, 2010 08:28PM

Re: what's the simplest way to serve php files through an alias?

edogawaconan October 02, 2010 09:08PM

Re: what's the simplest way to serve php files through an alias?

iberkner October 03, 2010 12:34AM

Re: what's the simplest way to serve php files through an alias?

iberkner October 03, 2010 12:42AM

Re: what's the simplest way to serve php files through an alias?

António P. P. Almeida October 03, 2010 12:44AM

Re: what's the simplest way to serve php files through an alias?

edogawaconan October 03, 2010 12:44AM

Re: what's the simplest way to serve php files through an alias?

iberkner October 03, 2010 12:52AM

Re: what's the simplest way to serve php files through an alias?

António P. P. Almeida October 02, 2010 09:38PM

Re: what's the simplest way to serve php files through an alias?

iberkner October 03, 2010 12:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 151
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready