Welcome! Log In Create A New Profile

Advanced

Re: nginx try_files & drupal

Vasiliy G Tolstov
October 09, 2009 09:54AM
В Птн, 09/10/2009 в 16:25 +0400, Igor Sysoev пишет:
> On Fri, Oct 09, 2009 at 03:45:45PM +0400, Vasiliy G Tolstov wrote:
>
> > В Птн, 09/10/2009 в 13:36 +0400, Igor Sysoev пишет:
> >
> > > Такой вариант лучше:
> > >
> > > 1) идеологически,
> > > 2) немного быстрее - нет нового поиска location'а после rewrite'а и нет
> > > двух regex'ов - "rewrite ^/(.*)$" и "location ~ \.php$".
> > >
> > > В принципе, можно обойтись и без @drupal вообще:
> > > try_files $uri $uri/ /index.php?q=$uri&$args;
> > >
> > >
> >
> >
> > Странно, но с таким вариантов не работает теперь image_cache модуль:
> >
> > первый атач - по конфигу вида:
> > 1.conf (1.log)
> >
> > второй по другому конфигу:
> > 2.conf (2.log)
> >
> > Есть ли какой-то вариант заставить try_files сработать и в этом случае?
>
> Я не совсем понял, в чём заключается неработа, но возможно, нужно поставить
> open_file_cache_errors off;
>

Нет, не помогает.
Неработа заключается в том, что в нормальном случае картинки физически
нет, запрос передается движку, он генерирует картинку и отдает.
В случае же использования try_files, опять таки nginx видит, что
картинки нет, передает управление движку (видимо уже с измененными по
сравнению с первым случае параметрами) и движок возвращает ошибку 404.


> Пара замечаний по конфигу:
> if ($http_host ~ "^blog.(.*)") {
> и прочая нужно заменить на
>
> server {
> server_name ~^blog.(.+)$;
> set $name $1;
> rewrite ^ http://$name/blog$request_ur?;
> }
>
> и прочая.
>

Спасибо, учту!

> Вместо
>
> location ~ "^/(CHANGELOG|COPYRIGHT|INSTALL\.mysql|INSTALL\.pgsql|INSTALL|LICENSE|MAINTAINERS|UPGRADE)\.txt" {
> deny all;
> }
>
> лучше сделать
> location = /CHANGELOG { deny all; }
> location = /INSTALL.mysql { deny all; }
> location = /INSTALL.pgsql { deny all; }
> location = /INSTALL { deny all; }
> и т.д.
>
>

А если таких location =200 ? тоже стоит сделать location для каждого или
регуляркой?


--
Vasiliy G Tolstov <v.tolstov@selfip.ru>
Selfip.Ru
Subject Author Posted

nginx try_files & drupal

Vasiliy G Tolstov September 29, 2009 09:42AM

Re: nginx try_files & drupal

Vitaliy Lisenko October 08, 2009 02:12AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 08, 2009 02:56AM

Re: nginx try_files & drupal

Igor Sysoev October 08, 2009 03:04AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 08, 2009 03:48AM

Re: nginx try_files & drupal

Igor Sysoev October 08, 2009 03:16AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 08, 2009 04:00AM

Re: nginx try_files & drupal

Igor Sysoev October 08, 2009 04:24AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 08, 2009 05:04AM

Re: nginx try_files & drupal

Igor Sysoev October 08, 2009 08:12AM

Re: nginx try_files & drupal

Alexey V. Karagodov October 08, 2009 03:02PM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 08, 2009 06:22PM

Re: nginx try_files & drupal

Igor Sysoev October 08, 2009 03:24PM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 08, 2009 06:22PM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 01:40AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 09, 2009 02:28AM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 02:44AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 09, 2009 03:18AM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 03:30AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 09, 2009 04:22AM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 04:50AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 09, 2009 05:40AM

Re[2]: nginx try_files & drupal

Denis F. Latypoff October 09, 2009 06:18AM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 06:50AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 09, 2009 05:18AM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 05:56AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 09, 2009 07:56AM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 08:36AM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 09, 2009 09:54AM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 10:10AM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 01:44PM

Re[2]: nginx try_files & drupal

Denis F. Latypoff October 09, 2009 02:24PM

Re: nginx try_files & drupal

Igor Sysoev October 09, 2009 02:44PM

Re: nginx try_files & drupal

Vasiliy G Tolstov October 09, 2009 03:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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