Chinaunix

标题: 问个有关nginx很初级的问题 [打印本页]

作者: 相当宏伟    时间: 2009-12-04 21:34
标题: 问个有关nginx很初级的问题
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
      expires      30d;
    }


这个location是什么意思啊?搜了些文档也没看到相关的解释

expires      30d  是指上面那些类型的文件在缓存里保留的时间吗?我猜的。不知道对不对


    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是表示吧php和php5类型的文件交给 fastcgi 出来是吧?
#fastcgi_pass  unix:/tmp/php-cgi.sock; 这行是什么呢?
fastcgi_pass  127.0.0.1:9000;这行是cgi运行的端口对吧?

fastcgi_index index.php;   这行的index.php 是什么啊?
作者: 相当宏伟    时间: 2009-12-06 15:31
up
作者: witer666    时间: 2010-03-05 18:18
location是一个标识。意思是本地的网站根目录吧!
是配置的固定模式。
作者: fivebull    时间: 2010-03-13 15:33
你应该仔细看手册。。。手册已经比较详细说明了
作者: starzhestarzhe    时间: 2010-03-18 09:46
这方面的资料应该在网上一抓一大把,在这里求助虽然不能说是浪费时间,但是还是看相关手册效率高些
作者: fsm11    时间: 2010-03-24 10:04
fastcgi_index index.php;   这行的index.php 是什么啊?
默认首先查找 index.php 这个文件 ,跟apache 里面的 index.html是一样的
作者: xczwhx    时间: 2010-03-24 16:41
看看,踩踩,有收获!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2