|
|
|
|
áòèé÷ :: nginx-ru
|
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
óËÒÙÔØ fastcgi header Expires, fast cgi_hide_header ÎÅ ÐÏÍÏÇ
- To: nginx-ru@xxxxxxxxx
- Subject: óËÒÙÔØ fastcgi header Expires, fast cgi_hide_header ÎÅ ÐÏÍÏÇ
- From: áÎÄÒÅÊ <deepmindster@xxxxxxxxx>
- Date: Thu, 26 Jun 2008 23:25:01 +0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=q8EAmifKHAfaw6NIkGpW1faA/2D206ghye/Rl3ZtGpw=; b=Jfdid4u/G2dgvTPiJ9sPG/feEME9BZfCM17G2jShm+c/D1qPLnO9swYidfgkFpm4IA zpHZ2lVSKzrD3jmZqgTezUV2kyiDKkcL/Syw5pvTpP+4Ry/7Y7Kfy3Lt8i3GTYPWetXY DwvN0aDcrrrsVKpRhC9+ulkAHxJReCKFHJxzY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=Ch+BYlA6toUvB2g9UrgckuEVvn5h74JzwCOycCZ10gy2kPQFgpFw8RlvqmkZT+Ixvm 6NvQ9+MIkoJEwq34OOMqAgTBNeJ00d2wB0DENPM6MjM7Z1YUIn52qgrsN2JOpTqd+3Ag jwCfdk3+hlOEKgk2B8+hTPE1o7FFmMCJajDGY=
äÏÂÒÏÇÏ ×ÒÅÍÅÎÉ ÓÕÔÏË.
ðÒÏÂÌÅÍÁ ÓÌÅÄÕÀÝÁÑ: ÎÅ ÐÏÌÕÞÁÅÔÓÑ ÓËÒÙÔØ ÚÁÇÏÌÏ×ÏË expires,
ÐÅÒÅÄÁ×ÁÅÍÙÊ fastcgi-ÓÅÒ×ÅÒÏÍ.
ëÏÎÆÉÇÕÒÁÃÉÑ: ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÎÅ ÂÙÌÏ ÂÌÏËÉÒÏ×ËÉ ÎÁ ÄÉÓËÅ, ÚÁÐÕÝÅÎÏ 2
nginx-Á, ÏÄÉÎ(ÏÓÎÏ×ÎÏÊ) ÓÌÕÛÁÅÔ ip x.x.x.x ÄÒÕÇÏÊ(ÄÏÐÏÌÎÉÔÅÌØÎÙÊ)
127.0.0.1. ïÓÎÏ×ÎÏÊ ÐÒÉÎÉÍÁÅÔ ÚÁÐÒÏÓÙ É ÏÔÄÁ£Ô ÉÈ fastcgi-ÓÅÒ×ÅÒÕ,
ËÏÔÏÒÙÊ ÏÂÒÁÂÁÔÙ×ÁÅÔ ÚÁÐÒÏÓ É ×ÏÚ×ÒÁÝÁÅÔ X-Accel-Redirect ÎÁ ÌÏËÅÊÛÎ
/saves/22.gif, ÎÁÐÒÉÍÅÒ. úÁÐÒÏÓ ÎÁ /saves ÐÒÏËÓÉÒÕÔÓÑ ÎÁ ÄÏÐÏÌÎÉÔÅÌØÎÙÊ
nginx, ËÏÔÏÒÙÊ ÕÓÔÁÎÁ×ÌÉ×ÁÅÔ expires 1y; É ÏÔÄÁ£Ô ÆÁÊÌ Ó ÄÉÓËÁ.
ðÒÏÂÏ×ÁÌ ÓÔÁ×ÉÔØ proxy_hide_header - ÕÂÉÒÁÅÔÓÑ ÚÁÇÏÌÏ×ÏË, ÏÔÄÁ×ÁÅÍÙÊ
ÐÒÏËÓÉ (ÞÔÏ, × ÏÂÝÅÍ-ÔÏ É ÏÖÉÄÁÅÔÓÑ). á ÎÁ fastcgi_hide_header ×ÏÏÂÝÅ
ÎÅÔ ÒÅÁËÃÉÉ. ðÏÄÓËÁÖÉÔÅ, ÐÏÖÁÌÕÊÓÔÁ, ËÁË ÓËÒÙÔØ ÈÉÄÅÒ ÄÌÑ ÄÁÎÎÏÊ
ËÏÎÆÉÇÕÒÁÃÉÉ.
ëÏÎÆÉÇÕÒÁÃÉÑ ÓÅÒ×ÅÒÏ×:
ïÓÎÏ×ÎÏÊ ÓÅÒ×ÅÒ:
ššš server {
ššššššš listenš x.x.x.x:80;
ššššššš server_nameš exampe.com;
ššššššš rootššššššššššš /srv/www/vhosts/exampe.com;
ššššššš indexšššššššššš no-such-image;
ššššššš access_logššššš /var/log/nginx/example.com.access.logšššššš
main;
ššššššš error_pageššššš 404 403šššššššššššššššš =200ššš /no-such-image;
ššššššš error_pageššššš 500 501 502 503 504šššš =200ššš /tech-problems;
ššššššš client_max_body_sizešššššš 16k;
ššššššš location / {
ššššššššššš rewrite ^/images/(\d+).*$ /index.php?image=$1 last;
ššššššššššš deny all;
ššššššš }
ššššššš location = /index.php {
ššššššššššš fastcgi_passšš 127.0.0.1:1026;
ššššššššššš fastcgi_paramš SCRIPT_FILENAMEš
/srv/www/vhosts/example.com$fastcgi_script_name;
ššššššššššš include fastcgi_params;
ššššššššššš fastcgi_hide_header Expires;
ššššššššššš fastcgi_hide_header Cache-Control;
ššššššššššš internal;
ššššššš }
ššš šš location /saves {
ššššššššššš proxy_passšššššššš http://127.0.0.1:1028/saves;
ššššššššššš proxy_redirectšššš off;
ššššššššššš proxy_set_headeršš Hostšššššššššššš $host;
ššššššššššš proxy_set_headeršš X-Real-IPššššššš $remote_addr;
ššššššššššš proxy_set_headeršš X-Forwarded-Forš
$proxy_add_x_forwarded_for;
ššššššššššš proxy_connect_timeoutššššš 90;
ššššššššššš proxy_send_timeoutšššššššš 90;
ššššššššššš proxy_read_timeoutšššššššš 90;
ššššššššššš proxy_bufferingšššššššššššš off;
ššššššššššš internal;
ššš ššš }
ššš }
äÏÐÏÌÎÉÔÅÌØÎÙÊ ÓÅÒ×ÅÒ:
server {
ššššššš listenš 127.0.0.1:1028;
ššššššš server_nameš example.com;
ššššššš rootššššššššššš /srv/www/vhosts/example.com;
ššššššš access_logššššš
/var/log/nginx_127.0.0.1/example.com.access.logšššš main;
ššššššš client_max_body_sizešššššš 16k;
ššššššš location / {
ššššššššššš deny all;
ššššššš }
ššššššš location /saves {
ššššššššššš root /srv/www/vhosts/example.com;
ššš šš šš šš expires 1y;
ššššššš }
ššš }
|
|
|
|