羽飞
2010-4-30 09:24
nginx如果定制自己的索引页面呢?
jason
2010-4-28 20:23
张老大,问你个问题:我用curl工具查询了你的首页,知道你的首页设置了expires
curl -I www.6curl.com
HTTP/1.1 200 OK
Date: Wed, 28 Apr 2010 12:12:34 GMT
Server: Apache
X-Powered-By: PHP/5.2.13
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Wed, 28 Apr 2010 12:12:34 GMT
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
但是我在我的nginx服务器上也设置了expires,但是用curl工具却查不到expires,不知是那出错了,张老大帮我看看吧
nginx的expires设置如下:
server
{
listen 80;
server_name *.*.*.*;
index index.html index.htm index.php;
root /data0/htdocs/wordpress;
#limit_conn crawler 20;
location ~ .*.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~* ^.+.(gif|jpg|jpeg|png|bmp|swf|html)$
{
expires 30d;
}
location ~* ^.+.(js|css)?$
{
expires 1h;
}
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /data1/logs/access.log access;
}
curl的查询结果如下:
HTTP/1.1 200 OK
Server: nginx/0.8.15
Date: Wed, 28 Apr 2010 20:21:43 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.2.10
curl -I www.6curl.com
HTTP/1.1 200 OK
Date: Wed, 28 Apr 2010 12:12:34 GMT
Server: Apache
X-Powered-By: PHP/5.2.13
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Wed, 28 Apr 2010 12:12:34 GMT
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
但是我在我的nginx服务器上也设置了expires,但是用curl工具却查不到expires,不知是那出错了,张老大帮我看看吧
nginx的expires设置如下:
server
{
listen 80;
server_name *.*.*.*;
index index.html index.htm index.php;
root /data0/htdocs/wordpress;
#limit_conn crawler 20;
location ~ .*.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~* ^.+.(gif|jpg|jpeg|png|bmp|swf|html)$
{
expires 30d;
}
location ~* ^.+.(js|css)?$
{
expires 1h;
}
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /data1/logs/access.log access;
}
curl的查询结果如下:
HTTP/1.1 200 OK
Server: nginx/0.8.15
Date: Wed, 28 Apr 2010 20:21:43 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.2.10
请问如果用FastCGI跑php,而用户会一直开着一个窗口页面,这样就经常造成php-cgi并发的不够用,请问有什么办法能够解决吗,还是只能开更多的php-cgi进程来维持
菜鸟小五
2010-4-27 21:18
为什么我安装装好APMServ 5.2.6 后,为何不能运行ASP文件?
打开本地网址后只出现文件列表。我该怎么处理?
打开本地网址后只出现文件列表。我该怎么处理?
laurance
2010-4-23 22:48
Norton SEP报vi.exe有病毒。经过对比,在AppServ、APMServ、XAMPP中,最后还是决定用APMServ,但是偏偏又病毒。郁闷坏了……
TBS
2010-4-23 20:20
真的学死人了。路由交换还没弄好~~见到linux又是一大块~~~~强悍
留下个QQ 248828412 与广大好友交流
留下个QQ 248828412 与广大好友交流
learn
2010-4-23 01:53
高手啊,无意中看到你的帖子,很羡慕你的技术,不知道收不收徒弟,想认个师傅