ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: fastcgi_cache работает как то странно



Это как раз начало конфига. В нем первый вирт хост (он же default)

> user  www www;
> worker_processes  2;
> pid        /var/run/nginx.pid;
> error_log /home/logs/nginx_error.log info; #error_log 
> /home/logs/nginx_error.log debug;
> 
> events {    worker_connections  16384; }
> 
> http {
>     include       mime.types;
>     default_type  application/octet-stream;
>     sendfile       on;
>     tcp_nopush     on;
>     tcp_nodelay    on;
>     server_names_hash_max_size 16384;
>     server_names_hash_bucket_size 128;
>     client_header_buffer_size 1k;
>     large_client_header_buffers 4 4k;
>     open_file_cache          max=1000  inactive=20s;
>     open_file_cache_valid    30s;
>     open_file_cache_min_uses 2;
>     open_file_cache_errors   on;
>     client_body_temp_path /mnt/md0;
>     fastcgi_temp_path /mnt/md0;
> 
>     gzip on;
>     gzip_min_length 1100;
>     gzip_buffers 4 8k;
>     gzip_types text/plain;
>     output_buffers 1 32k;
>     postpone_output 1460;
>     keepalive_timeout 75 20;
> 
>     fastcgi_connect_timeout 30;
>     fastcgi_send_timeout 600;
>     fastcgi_read_timeout 600;
>     fastcgi_buffer_size 32k;
>     fastcgi_buffers 4 32k;
>     fastcgi_busy_buffers_size 32k;
>     fastcgi_temp_file_write_size 32k;
>     fastcgi_intercept_errors on;
> 
> 
> 
>     server {
> 
>         listen тут мой ип:80;
>         server_name короткое имя localhost тут мой ип default;

Это тут ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>         access_log /home/logs/default_access.log combined;
>         error_log /home/logs/default_error.log info;
>         root /home/htdocs;
>         index index.pl index.php index.html index.cgi ;
>         server_name_in_redirect off;
> 
>           location /test.rar {
>              root  /home/htdocs/;
>           }
> 
>                location / {
>                    auth_basic            "closed site";
>                    auth_basic_user_file  /home/htdocs/.ht_passwd;
>                    index index.pl;
>                } 
>                 location ~ .php$ {
>                     set $path_info $fastcgi_script_name;
>                     set $real_script_name $fastcgi_script_name;
>                     if ($fastcgi_script_name ~ "(.+?.php)(/.+)$") {
>                         set $real_script_name $1;
>                         set $path_info $2;
>                     }
>                     fastcgi_param SCRIPT_FILENAME 
> /home/htdocs$real_script_name;
>                     fastcgi_param SCRIPT_NAME $real_script_name;
>                     fastcgi_param PATH_INFO $path_info;
> 
> 
>                     fastcgi_pass unix:/mnt/md0/php-fcgi.sock;
>                     include  /usr/local/nginx/conf/phpcgi.conf;
>                     fastcgi_param       PHP_INI_ENTRIES "
>                                         open_basedir
/home/htdocs
>                                         include_path 
> .:/usr/local/lib/php
>                                         error_log 
> /home/logs/php_htdocs.log
>                     ";
> 
>                 }
>                 location ~ /index.cgi/ {
>                     if ($fastcgi_script_name ~ (.*/index.cgi)/.*$) {
>                          set $valid_fastcgi_script_name $1;
>                     }
> 
>                     fastcgi_pass    unix:/mnt/md0/nginx-fcgi.sock;
>                     include  /usr/local/nginx/conf/fastcgi.conf;
>                     fastcgi_param       SCRIPT_FILENAME
> /home/htdocs$valid_fastcgi_script_name;
>                 }
> 
>                 location ~ .pl$  {
>                     set $valid_fastcgi_script_name $fastcgi_script_name;
>                     if ($fastcgi_script_name ~ /awstats/(.*.pl)$) {
>                         set $valid_fastcgi_script_name
/awstats/cgi-bin/$1;
>                     }
>                     fastcgi_param       SCRIPT_FILENAME
> /home/htdocs$valid_fastcgi_script_name;
>                     fastcgi_pass    unix:/mnt/md0/nginx-fcgi.sock;
>                     fastcgi_index    index.pl;
>                     include  /usr/local/nginx/conf/fastcgi.conf;
>                 }
> 
>                 location /stats {
>                     auth_basic            "closed site";
>                     auth_basic_user_file  /home/htdocs/stats/.ht_passwd;
>                     index index.pl;
>                 }
> 
>                 location /sql {
>                     index index.php;
>                 }
>     }
> 
> >       server {
> >             listen тут мой ип:80;
> >             server_name test.com *.test.com;
> >             access_log /home/logs/bot_access.log combined;
> >             error_log /home/logs/bot_error.log info;
> >             server_name_in_redirect off;
> >             root /home/bot;
> >             index index.php index.html;
> >             proxy_set_header   X-Real-IP     $remote_addr;
> >             # redirect to php
> > 
> >    location / {
> >         proxy_set_header Host $http_host;
> >         proxy_set_header X-Real-IP $remote_addr;
> > #                   proxy_set_header X-Forwarded-For
> > $proxy_add_x_forwarded_;
> >         proxy_pass_request_headers on;
> >         proxy_pass_request_body on;
> >         proxy_pass  http://127.0.0.1:80/;
> >         proxy_redirect default;
> >     }
> > }

Ниже еще очень много вирт хостов ... 




 




Copyright © Lexa Software, 1996-2009.