nginx + phpPgAdmin

mj_nooker nginx-forum at nginx.us
Mon Apr 15 00:21:59 UTC 2013


Привет!

FreeBsd + nginx + php-fpm + phpPgAdmin.

Есть сайт site.com
Он лежит в /var/www/sites/site.com/public

Надо к нему прикрутить phpPgAdmin.
Он лежит в /usr/local/www/phpPgAdmin

Начитался документации и примеров nginx + phpMyAdmin.
Настроил nginx.conf

Сайт работает (blitz, php)
phpPgAdmin - нет. 
Если набираю site.com/pgadmin - пишет No input file specified.
Если набираю site.com/pgadmin/index.html (тестовый статический
/usr/local/www/phpPgAdmin/index.html) - все ок, html отображается.

Конфиг nginx:

user  www www;
worker_processes  2;

error_log  /var/log/nginx/nginx-error.log;

pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request"
'
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    server_names_hash_bucket_size 64;
    access_log  /var/log/nginx/access.log;

    sendfile        on;
    client_max_body_size 2000m;
    keepalive_timeout  60;

    include /usr/local/etc/nginx/Include/site.com.conf;

}

Конфиг Include/site.com.conf :

server {
        listen       91.203.31.184:80;
        server_name  site.com www.site.com;

    sendfile             on;
    client_max_body_size 2000m;
    keepalive_timeout    60;

        location / {
                root /var/www/sites/site.com/public;
                try_files $uri $uri/ /index.php?route=$uri&$args;
                index index.html index.php;

               add_header Last-Modified "";
        }

	location /pgadmin/ {
		alias /usr/local/www/phpPgAdmin/;
		fastcgi_pass 127.0.0.1:9000;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $request_filename;
		include /usr/local/etc/nginx/fastcgi_params;
	}

        server_name_in_redirect off;

        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;

                fastcgi_param  SCRIPT_FILENAME 
/var/www/sites/site.com/public$fastcgi_script_name;
                fastcgi_param  QUERY_STRING     $query_string;
                fastcgi_param  REQUEST_METHOD   $request_method;
                fastcgi_param  CONTENT_TYPE     $content_type;
                fastcgi_param  CONTENT_LENGTH   $content_length;
                fastcgi_param  REDIRECT_STATUS  200;
                fastcgi_param  REQUEST_URI        $request_uri;
                fastcgi_param  DOCUMENT_URI       $document_uri;
                fastcgi_param  DOCUMENT_ROOT      $document_root;
                fastcgi_param  SERVER_PROTOCOL    $server_protocol;
                fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
                fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;
                fastcgi_param  REMOTE_ADDR        $remote_addr;
                fastcgi_param  REMOTE_PORT        $remote_port;
                fastcgi_param  SERVER_ADDR        $server_addr;
                fastcgi_param  SERVER_PORT        $server_port;
                fastcgi_param  SERVER_NAME        $server_name;

        	fastcgi_connect_timeout     60;
        	fastcgi_ignore_client_abort on;
        	fastcgi_intercept_errors    on;
        	fastcgi_read_timeout        60;
        	fastcgi_send_timeout        60;

        	charset                utf-8;
        	fastcgi_cache_valid    200 301 302 304 1m;
        	fastcgi_cache_key     
"$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";
        	fastcgi_ignore_headers "Cache-Control" "Expires";
        	fastcgi_hide_header    "Cache-Control";
     	   	add_header             Cache-Control "no-store, no-cache,
must-revalidate, post-check=0, pre-check=0";
        	fastcgi_hide_header    "Pragma";
        	add_header             Pragma "no-cache";
        	expires                -1;
        	add_header             Last-Modified $sent_http_Expires;

	        fastcgi_buffer_size          512k;
        	fastcgi_buffers              4 512k;
   	     	fastcgi_busy_buffers_size    512k;
	        fastcgi_temp_file_write_size 512k;
	}

}

Пожалуйста, подскажите, где может быть ошибка? 
Два дня промучился, глаза красные, а толку нет.

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,238367,238367#msg-238367



Подробная информация о списке рассылки nginx-ru