搜索 nginx header unset last-modified 找到了答案
Igor Sysoev
Re: How to disable/not to send Last-Modified Header
March 11, 2010 04:04PM Admin
Registered: 1 year ago
Posts: 2,277
On Thu, Mar 11, 2010 at 12:08:43PM -0500, tunggad wrote:
We are using NGINX to front end Jetty Server, serving static content is done by NGINX and we want to disable/remove the Last-Modified Header.
似乎需要停用global redirect下的 从unclean url定向到clean url的选项。
似乎需要停用global redirect下的 从unclean url定向到clean url的选项。
So it seems we are already fully compatible with Boost with enabled pre-gzipping if the Nginx version used has gzip_static available and enabled. Thanks!
http://groups.drupal.org/node/84519#comment-263069
windows service supported.
Igor Sysoev to nginx
show details 4:04 AM (4 hours ago)
On Mon, Aug 02, 2010 at 10:01:26PM +0200, Fernando Perez wrote:
Sorry for the typos, trialing should read trailing.
Here is the complete thing for those interested, your mileage may vary
depending how you want the backend app to handle /blog/uri or just /uri
location ^~ /blog/ {
rewrite /blog/(.+) $1 break;
proxy_set_header Host $http_host;
root /optional/root;
proxy_pass http://127.0.0.1:3000/$1;
}
some///uri 竟然是正确的uri。
明确地在nginx中写了
proxy_redirect http://s.2u4u.comc.cn:8081 /;
后,问题解决了。
我没深究原因,似乎是这个xampp的配置中,apache配置里添加了给每个uri都添 加 ending slash,也就是一个斜杠。这种配置下,nginx中需要写上上面那句。 也属于试验的时候一个个尝试出来的
参考: http://forum.nginx.org/read.php?2,105524,106854#msg-106854
Igor Sysoev Wrote:
*) Change: now nginx does not cache by default
backend responses, if
they have a "Set-Cookie" header line.
What's the recommended method to cache even with the Set-Cookie header
present?
proxy_ignore_headers Set-Cookie;
proxy_hide_header Set-Cookie;
Note that Set-Cookie header no longer hidden by default so you
have to explicitly hide it via proxy_hide_header if it's not
现在使用的方法
这个方法不好,参考 http://pengyou.rijiben.org/node/3185
之前的方法
参考: http://www.cyberciti.biz/faq/freebsd-configure-nginx-php-fas...
然后在本机安装一个lighttpd,把 /usr/local/bin/spawn-fcgi 复制到服务器一个目录下。这个文件是lightttpd带的,用来启动fastcgi的。
在服务器上写一个脚本,一句话: /home/apache/apps/spawn-fcgi -a 127.0.0.1 -p 3456 -u apache -g apache -f /home/apache/apps/fastcgiphp/bin/php-cgi 可以把这句话加到 /etc/rc.local 让它开机启动