Welcome! Log In Create A New Profile

Advanced

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Francis Daly
May 03, 2012 06:44PM
On Thu, May 03, 2012 at 05:59:54AM -0700, antituhan wrote:

Hi there,

> How about php directive cliff ? I still get errors, my full directive like
> this http://fpaste.org/TOW3/

The important part here is that your top-level location{} directives are

location /
location /cdnize/
location ~ .php$

Each request will be handled by exactly one of those blocks.

> And i have a index.php on /home/antituhan/public_html to be triggered by
> another upstream outsite with
> http://static.antituhan.com/cdnize/index.php?q=datahere and it says not
> found. Is my .php directive wrong ?

The request for /cdnize/index.php would be handled by the "location ~
..php$" block.

In there, you have

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

and $document_root is "root", which is inherited from the

root /home/antituhan/static;

directive at server level. So this request ends up (with the fastcgi
server) looking for the file /home/antituhan/static/cdnize/index.php,
which is presumably not what you want.

Probably you'll want to look at nesting a php location inside the /cdnize/
one. And then moving the current php location to be inside the / one.

So you will probably need to have two or more locations that handle php,
which each use a fastcgi_pass directive.

I'm sure there are recent examples of this set-up on the mailing list.

Good luck with it,

f
--
Francis Daly francis@daoine.org

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

Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan May 01, 2012 05:38AM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Cliff Wells May 01, 2012 12:22PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan May 01, 2012 01:00PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

elico May 01, 2012 01:02PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Francis Daly May 01, 2012 01:54PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Cliff Wells May 01, 2012 02:30PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan May 01, 2012 10:22PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Cliff Wells May 02, 2012 12:58AM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan May 03, 2012 09:02AM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Francis Daly May 03, 2012 06:44PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan May 11, 2012 01:00AM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Francis Daly May 11, 2012 04:06AM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan November 27, 2012 07:10AM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Francis Daly November 30, 2012 05:40PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan December 04, 2012 11:12AM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

Francis Daly December 04, 2012 12:46PM

Re: Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan December 05, 2012 09:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 238
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