drupal+nginx: this works => using try_files
mike
mike503 at gmail.com
Wed Mar 18 01:21:42 MSK 2009
On Tue, Mar 17, 2009 at 12:57 PM, Mark Alan <varia at e-healthexpert.org> wrote:
> mike wrote:
>>
>> a) drupal should not include scripts/etc. that should not be ran via
>> the web -in- the webroot, or
>> b) they should be localized to only one directory
>
> Those were/are options of the Drupal Development Team.
I've got a bone to pick ...
> That is an interesting idea, but the level of complexity would be quite the
> same.
Ideally it would be
location /drupal {
try_files $uri $uri/ /drupal/index.php?q=$uri;
}
location /drupal/protected {
internal;
}
pretty simple (ideally)
> In what way would that contribute to reduce complexity, or better document
> the procedure?
Both. Why have duplication in configuration files (especially common
things such as that) if unnecessary?
> On the contrary, it has.
location @drupal just has the rewrite to /index.php?q=$uri
This was what I meant. The other "block these scripts" stuff... I
would like to pick a bone with the drupal folks for not localizing
those into at least a single directory.
>> you could get away with:
>> try_files $uri $uri/ /index.php?q=$request_uri;
>
> That does not work. You could at least have tried it...
I swear Igor said it should work.
> I am sure that you will provide a couple of cleaner examples to help us all.
This sounds kind of sarcastic; but yes, I would like to. A lot of
people's nginx configurations they post when they have questions are
littered with extra stuff which just leads to confusion or
confliction.
More information about the nginx
mailing list