Welcome! Log In Create A New Profile

Advanced

Re: alias issue again

December 01, 2011 04:09AM
Gena Makhomed Wrote:

> скорее всего ему не только
> /pma/ нужно будет на сервере,
> но и другие locations тоже.
> поэтому наверное - лучше
> изначально
> писать легко
> масштабируемую
> конфигурацию, используя
> вложенные
> locations, т.е. примерно так:
>
> server {
> ...
> location /pma/ {
> ...
> location ~ \.php$ {
> ...
> }
> }
> }
>

Если я правильно понял Вашу идею, то конфиг получился такой:

location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param DOCUMENT_ROOT /usr/local/www;
fastcgi_param SCRIPT_FILENAME /usr/local/www$fastcgi_script_name;
include fastcgi_params;
}

location /pma/ {
alias /usr/local/www/phpMyAdmin/;
#root /usr/local/www/phpMyAdmin;
index index.php;

location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param DOCUMENT_ROOT /usr/local/www/phpMyAdmin;
fastcgi_param SCRIPT_FILENAME /usr/local/www/phpMyAdmin$fastcgi_script_name;
include fastcgi_params;
}

}

но в логе получаею что-то для меня совсем непонятное:

errlog

2011/12/01 16:05:14 [info] 83996#0: *45 client closed prematurely connection while reading client request line, client: 213.133.166.70, server: localhost
2011/12/01 16:05:14 [info] 83996#0: *44 client closed prematurely connection while reading client request line, client: 213.133.166.70, server: localhost

access

213.133.166.70 - - [01/Dec/2011:16:05:01 +0700] "GET /pma/ HTTP/1.1" 404 5 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2"
213.133.166.70 - - [01/Dec/2011:16:05:14 +0700] "-" 400 0 "-" "-"
213.133.166.70 - - [01/Dec/2011:16:05:14 +0700] "-" 400 0 "-" "-"




>
> вместо rewrite ^/pma/(.+)$ /phpMyAdmin/$1
> break;
> в конфиге наверное лучше
> использовать alias все-таки.
> судя по документации
> именно для этого директива
> alias и придумана.
>

Да, хотелось бы таки добить через алиасы.
Хотя, может быть для моего сулчая это неправильный инструмент?
Задачу правильней решать иначе?
Subject Author Posted

alias issue again

yokodzun November 29, 2011 04:49PM

Re: alias issue again

Craken November 30, 2011 12:58AM

Re: alias issue again

Craken November 30, 2011 01:01AM

Re: alias issue again

yokodzun November 30, 2011 03:27AM

Re: alias issue again

Craken November 30, 2011 09:43AM

Re: alias issue again

Валентин Бартенев November 30, 2011 03:16AM

Re: alias issue again

yokodzun November 30, 2011 03:28AM

Re: alias issue again

Валентин Бартенев November 30, 2011 03:40AM

Re: alias issue again

yokodzun November 30, 2011 04:11AM

Re: alias issue again

Валентин Бартенев November 30, 2011 04:48AM

Re: alias issue again

yokodzun November 30, 2011 06:15AM

Re: alias issue again

Валентин Бартенев November 30, 2011 09:34AM

Re: alias issue again

Валентин Бартенев November 30, 2011 10:30AM

Re: alias issue again

yokodzun November 30, 2011 10:55AM

символ '/' в конце пути в директивах alias и root

Gena Makhomed November 30, 2011 08:24AM

Re: символ '/' в конце пути в директивах alias и root

Igor Sysoev November 30, 2011 08:32AM

Re: символ '/' в конце пути в директивах alias и root

Andrey N. Oktyabrski November 30, 2011 08:40AM

Re: alias issue again

Craken November 30, 2011 10:22AM

Re: alias issue again

yokodzun November 30, 2011 10:53AM

Re: alias issue again

Валентин Бартенев November 30, 2011 11:04AM

Re: alias issue again

p1gmale0n November 30, 2011 11:18AM

Re: alias issue again

Валентин Бартенев November 30, 2011 11:22AM

Re: alias issue again

p1gmale0n November 30, 2011 11:24AM

Re: alias issue again

Валентин Бартенев November 30, 2011 11:32AM

Re: alias issue again

Gena Makhomed November 30, 2011 12:42PM

Re: alias issue again

Валентин Бартенев November 30, 2011 01:30PM

Re: alias issue again

Gena Makhomed November 30, 2011 02:06PM

Re: alias issue again

Валентин Бартенев November 30, 2011 02:38PM

Re: alias issue again

Gena Makhomed November 30, 2011 07:40PM

Re: alias issue again

yokodzun December 01, 2011 04:09AM

Re: alias issue again

Gena Makhomed December 01, 2011 07:58AM

Re: alias issue again

yokodzun December 01, 2011 08:57AM

Re: alias issue again

Gena Makhomed December 01, 2011 11:30AM

Re: alias issue again

Alexander Moskalenko December 02, 2011 01:16PM

Re: alias issue again

Alexander Moskalenko December 02, 2011 01:34PM

Re: alias issue again

yokodzun December 05, 2011 04:08AM

Re: alias issue again

Валентин Бартенев December 05, 2011 04:30AM

Re: alias issue again

yokodzun December 05, 2011 05:01AM

Re: alias issue again

Валентин Бартенев December 05, 2011 05:30AM

Re: alias issue again

yokodzun December 05, 2011 05:58AM

Re: alias issue again

Валентин Бартенев December 05, 2011 06:10AM

Re: alias issue again

yokodzun December 05, 2011 06:22AM

Re: alias issue again

Валентин Бартенев December 05, 2011 06:34AM

Re: alias issue again

yokodzun December 05, 2011 06:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 181
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready