Welcome! Log In Create A New Profile

Advanced

Re: настройка сервера для отдачи статики для 2-х серверов

May 11, 2010 08:28AM
On Tue, May 11, 2010 at 08:07:22AM -0400, demoversion wrote:

> Вобщем сделал так - http://pastie.org/955222
> и все заработало!!! )))

"set $fullpath /$host$uri" не нужен вообще. Так же как и

if (-f $request_filename) {

Упрощаем:

server {
listen 80;
server_name site.if.ua site.te.ua;
root /wwwdata/site/public;
location ~* \.(js|css|jpg|jpeg|gif|png|ico)$ {
expires max;
}

location / {
root /wwwdata/site/public/$host;
try_files $uri.html
$uri
$host/$uri.html
/$host/$uri.html
/$host$uri
@list;
}

location @list {
passenger_enabled on;
}
}

и видим безумное количество комибнаций в try_files:

$uri.html
$uri
$host/$uri.html
/$host/$uri.html
/$host$uri

Которые, скорее всего, сокращаются до:

$uri.html
$uri


--
Игорь Сысоев
http://sysoev.ru

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

Re: настройка сервера для отдачи статики для 2-х серверов

Igor Sysoev May 11, 2010 08:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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