Welcome! Log In Create A New Profile

Advanced

Re: Возможно это баг в обработке location

Maxim Dounin
February 09, 2012 09:36AM
Hello!

On Thu, Feb 09, 2012 at 04:34:50PM +0400, Алексей Востриков wrote:

> Что именно соответствует?
>
> если я в конфиге укажу location /pa/ {...}
>
> то:
>
> http://www.xxx.com/pa - обрабатывается корневым индексом а не
> постфиксадминовским
> http://www.xxx.com/pa/ - выдает ошибку 403
> http://www.xxx.com/pa/index.php - предлагает скачать исходный код index.php
>
> помогите тогда правильно сконфигурить
> так чтобы
> http://www.xxx.com/pa - показывал постфиксадмин
>
> http://www.xxx.com/partner - обрабатывался корневым индексом

location / {
...
}

location = /pa {
alias /usr/share/postfixadmin;
}

location /pa/ {
alias /usr/share/postfixadmin/;
...
}

Maxim Dounin


>
> 09.02.2012 14:59, Yuriy Vidineev пишет:
> >По-моему, вполне соответствует описанному здесь поведению:
> >http://nginx.org/ru/docs/http/ngx_http_core_module.html#location
> >
> >9 февраля 2012 г. 16:44 пользователь Алексей Востриков
> ><alex@teletrade-dj.com <mailto:alex@teletrade-dj.com>> написал:
> >
> > Почемуто на нижеприведенном конфиге
> > http://www.xxx.com/partner
> > обрабатывается в локейшине /pa , а не в корне
> > nginx-full 1.1.8-2~bpo60+1 debian squeeze-backports
> > -----------------------%<--------------------------------------------------------------
> > server {
> >
> > listen 12.34.56.78:80 http://12.34.56.78:80;
> > server_name
> > www.xxx.com http://www.xxx.com
> > xxx.com http://xxx.com
> > ;
> >
> > access_log /sites/xxx.com/log/access.log
> > http://xxx.com/log/access.log;
> > error_log /sites/xxx.com/log/error.log
> > http://xxx.com/log/error.log;
> >
> > root /sites/xxx.com/www http://xxx.com/www;
> >
> > location / {
> > root /sites/xxx.com/www http://xxx.com/www;
> > index index.php;
> > try_files $uri $uri/ /index.php?$args ;
> >
> > location ~ \.php$ {
> > try_files $uri /index.php?$args ;
> > include fastcgi_params;
> > fastcgi_param DOCUMENT_ROOT
> >/sites/xxx.com/www http://xxx.com/www;
> > fastcgi_param SCRIPT_FILENAME
> >/sites/xxx.com/www$fastcgi_script_name
> > http://xxx.com/www$fastcgi_script_name;
> > fastcgi_param QUERY_STRING $args;
> > fastcgi_pass 127.0.0.1:9000 http://127.0.0.1:9000;
> > }
> > }
> >
> > location /.a {
> > index index.php;
> > try_files $uri $uri/ /.a/index.php?$args;
> >
> > location ~ \.php$ {
> > try_files $uri /.a/index.php?$args ;
> > root /sites/xxx.com/www http://xxx.com/www;
> > include fastcgi_params;
> > fastcgi_param DOCUMENT_ROOT
> >/sites/xxx.com/www http://xxx.com/www;
> > fastcgi_param SCRIPT_FILENAME
> >/sites/xxx.com/www$fastcgi_script_name
> > http://xxx.com/www$fastcgi_script_name;
> > fastcgi_param QUERY_STRING $args;
> > fastcgi_pass 127.0.0.1:9000 http://127.0.0.1:9000;
> > }
> > }
> >
> > location /pa {
> > alias /usr/share/postfixadmin;
> > index index.php;
> >
> > location ~ /pa/(.*\.php)$ {
> > alias /usr/share/postfixadmin;
> > fastcgi_pass 127.0.0.1:9000 http://127.0.0.1:9000;
> > fastcgi_index index.php;
> > include fastcgi_params;
> > fastcgi_param SCRIPT_FILENAME
> >/usr/share/postfixadmin/$1;
> > fastcgi_param DOCUMENT_ROOT
> >/usr/share/postfixadmin;
> > }
> > }
> > }
> > -----------------------%<--------------------------------------------------------------
> >
> > _______________________________________________
> > nginx-ru mailing list
> > nginx-ru@nginx.org <mailto:nginx-ru@nginx.org>
> > http://mailman.nginx.org/mailman/listinfo/nginx-ru
> >
> >
> >
> >
> >
> >_______________________________________________
> >nginx-ru mailing list
> >nginx-ru@nginx.org
> >http://mailman.nginx.org/mailman/listinfo/nginx-ru

> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru

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

Возможно это баг в обработке location

Алексей Востриков February 09, 2012 05:46AM

Re: Возможно это баг в обработке location

Yuriy Vidineev February 09, 2012 06:00AM

Re: Возможно это баг в обработке location

Алексей Востриков February 09, 2012 07:36AM

Re: Возможно это баг в обработке location

Maxim Dounin February 09, 2012 09:36AM

Re: Возможно это баг в обработке location

Алексей Востриков February 09, 2012 11:04AM

Re[2]: location

Andrey Repin February 10, 2012 07:36AM

Re: Возможно это баг в обработке location

Maxim Dounin February 10, 2012 08:32AM

Re[2]: location

Andrey Repin February 10, 2012 10:06AM

Re: Возможно это баг в обработке location

Maxim Dounin February 10, 2012 10:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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