Welcome! Log In Create A New Profile

Advanced

Re: Some Issues with Configuration

Jonathan Matthews
March 05, 2014 04:48PM
On 5 March 2014 21:18, Richard Ibbotson <richard.ibbotson@gmail.com> wrote:
> On Wednesday 05 Mar 2014 21:03:22 Jonathan Matthews wrote:
>> Nginx doesn't execute PHP. It passes each request destined for your
>> blog (i.e. the locations you decide are "your blog") to another
>> process that runs/is-running the PHP. Take a look here, and it might
>> help:
>
>>> http://wiki.nginx.org/WordPress<<
>
> I'll have a read through this again. The part that might work is...
>
> location /blog {
> try_files $uri $uri/ /blog/index.php?$args;
> }
>
> location ~ \.php$ {
> fastcgi_split_path_info ^(/blog)(/.*)$;
> }

Your indenting is/might-be misleading. Are you intending to
encapsulate the PHP regex inside the /blog prefix, as your indenting
suggests? 'Cos your braces aren't doing that.

> But... I have not just /blog but others. Such as /journalism and
> others. Do I just put in another location for that ? Such as ....
>
> location /journalism {
> try_files $uri $uri/ /journalism/index.php?$args;
> }
>
> location ~ \.php$ {
> fastcgi_split_path_info ^(/journalism)(/.*)$;
> }

In general, each request is handled in one location and one location
*only* in nginx. There are some directives which inherit down config
levels (http{}, server{}, location{}, nested location {}) but they're
not the ones you'll (probably) be caring about here.

If you can, pop your blog on its own FQDN so you can seperate out
traffic into different server{} stanzas. That works well as a base
level of distinction between traffic which should hit PHP and that
which shouldn't.

>> If you're still stuck, please have a google before asking more
>> questions here. There are many, many, *many* articles out there,
>> explaining how to get Nginx+PHP/WordPress working, and the config
>> you posted above strongly suggests you've not read any of them yet!
>> The Internet is your friend ... ;-)
>
> I spent a month doing that. Been going to ApacheCon since 2001. Done
> most international GNU/Linux and BSD conferences. Seen a few things.
> I'm a bit lost on NGINX configuration. Something new to learn :)

Apologies - I assumed from the config you posted you'd not done any reading :-)

Nothing you've posted yet specifies the method you're using to talk to
your PHP-executing process. Perhaps you should post a more complete
config and let us know what you've tried already ...

J

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Some Issues with Configuration

Richard Ibbotson March 05, 2014 06:14AM

Re: Some Issues with Configuration

Jonathan Matthews March 05, 2014 04:04PM

Re: Some Issues with Configuration

Richard Ibbotson March 05, 2014 04:20PM

Re: Some Issues with Configuration

Jonathan Matthews March 05, 2014 04:48PM

Re: Some Issues with Configuration

Richard Ibbotson March 08, 2014 04:04PM

Re: Some Issues with Configuration

Francis Daly March 09, 2014 07:08AM

Re: Some Issues with Configuration

GreenGecko March 06, 2014 12:18AM

Re: Some Issues with Configuration

Richard Ibbotson March 10, 2014 05:56PM

Re: Some Issues with Configuration

Francis Daly March 11, 2014 04:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 205
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready