Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] implement a $location variable

António P. P. Almeida
January 04, 2013 06:08AM
On 4 Jan 2013 11h35 CET, david@gwynne.id.au wrote:

>
> On 04/01/2013, at 7:04 PM, António P. P. Almeida <appa@perusio.net>
> wrote:
>
>> On 4 Jan 2013 03h18 CET, david@gwynne.id.au wrote:
>>
>>> need is a strong work, its just a lot nicer.
>>>
>>>> Have you each site installed in a subdir? Is that the case?
>>>
>>> no. it is a single copy of the drupal codebase which is shared by
>>> all the sites, they just have separate settings.php files. the way
>>> nginx tells drupal which settings to use is via SCRIPT_NAME based
>>> on $location.
>>
>> Ok. If I understood correctly you have a typical multi-site
>> setup. Why are you doing the host resolution at the server level?
>> Drupal does it at the application level. It's capable of handling
>> all hosts for which the vhost is configured to support.
>>
>> See:
>> http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/conf_path/7
>
> that makes it look like i can pass $request_uri as
> SCRIPT_NAME. however, while drupal does get the right site
> settings.php file doing that, for some reason it cant figure out
> which page its on. it either generates a 404 or only shows the home
> page no matter what uri i give it in a web browser.

That should work out of the box without any "tinkering".

<shameless plug>
Here's a Drupal config that works with multisites as designed:
https://github.com/perusio/drupal-with-nginx
</shamelessplug>

Also there's a Drupal group for Nginx:

http://groups.drupal.org/nginx

> while i do take the point that there are other ways of making drupal
> do what i want with and unpatched nginx, that doesnt mean other
> things couldnt make good use of a $location variable.

Sure. You have to sell the idea to the Nginx devs.

--- appa

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

[PATCH] implement a $location variable

David Gwynne 1286 October 14, 2012 09:24PM

Re: [PATCH] implement a $location variable

Maxim Dounin 533 October 15, 2012 10:54AM

Re: [PATCH] implement a $location variable

David Gwynne 588 October 16, 2012 09:18AM

Re: [PATCH] implement a $location variable

Maxim Dounin 572 October 16, 2012 10:48AM

Re: [PATCH] implement a $location variable

David Gwynne 583 October 16, 2012 07:44PM

Re: [PATCH] implement a $location variable

David Gwynne 441 January 03, 2013 08:24PM

Re: [PATCH] implement a $location variable

António P. P. Almeida 430 January 03, 2013 09:00PM

Re: [PATCH] implement a $location variable

António P. P. Almeida 461 January 03, 2013 09:12PM

Re: [PATCH] implement a $location variable

David Gwynne 410 January 03, 2013 09:20PM

Re: [PATCH] implement a $location variable

António P. P. Almeida 483 January 04, 2013 04:06AM

Re: [PATCH] implement a $location variable

David Gwynne 461 January 04, 2013 05:36AM

Re: [PATCH] implement a $location variable

António P. P. Almeida 660 January 04, 2013 06:08AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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