[PATCH] implement a $location variable

David Gwynne david at gwynne.id.au
Fri Jan 4 10:35:15 UTC 2013


On 04/01/2013, at 7:04 PM, António P. P. Almeida <appa at perusio.net> wrote:

> On 4 Jan 2013 03h18 CET, david at 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.

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.

dlg

> 
> --- appa
> 
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel



More information about the nginx-devel mailing list