Re: nginx не держит сессий php

alexch nginx-forum на nginx.us
Пт Янв 21 15:03:33 MSK 2011


server {
listen 80;
server_name dtkt.com.ua www.dtkt.com.ua debetkredit.com.ua
www.debetkredit
.com.ua dokumenty.com.ua www.dokumenty.com.ua;
root /usr/home/dtkt/www/;
server_name_in_redirect off;
reset_timedout_connection on;

# access_log /var/log/nginx/dtkt_access.log main;

location / {
index index.html index.htm;

proxy_pass http://127.0.0.1:88/;
proxy_cache all;
proxy_cache_valid 404 502 1m;
proxy_cache_valid 200 301 302 304 10m;
proxy_cache_valid 503 4s;
proxy_cache_valid any 1h;
proxy_cache_key $scheme$http_host$uri$is_args$args;
proxy_cache_min_uses 1;
proxy_cache_use_stale error timeout updating invalid_header http_500
http_50
2 http_503 http_504;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header "Set-Cookie";
proxy_ignore_headers Expires Cache-Control;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 180;
proxy_buffer_size 16k;
proxy_buffers 8 16k;
proxy_busy_buffers_size 32k;
proxy_intercept_errors on;
# proxy_redirect off;
}
location ~*
^.+\.(jpg|jpeg|gif|png|swf|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pd
f|ppt|txt|tar|wav|bmp|rtf|css|js)$ {
root /usr/home/dtkt/www/;
index index.html index.htm;
access_log off;
expires 5h;
open_file_cache max=1024 inactive=3600s;
open_file_cache_valid 2000s;
open_file_cache_min_uses 1;
open_file_cache_errors on;
gzip on;
gzip_types text/plain text/css text/javascript text/x-javascript
application
/x-javascript;
gzip_http_version 1.0;
gzip_proxied any;
gzip_disable "MSIE [1-6]\.";

}

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




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