xubaoguo 发表于 2013-07-04 15:25

nginx报404

明明文件存在,怎么还报404呢???

平台:windows 7
nginx版本:1.0.14
配置文件:

server {
      listen       127.0.0.1:90;
      server_name123.dev www.123.dev;
    access_loglogs/123.log;
    #autoindex on;
   
      location / {
      root   D:www/shop_php/shop;
      indexindex.html index.htm index.php;
            
      }

      location ~ \.php$ {
      root   D:www/shop_php/shop;
      fastcgi_pass   127.0.0.1:9001;
      fastcgi_indexindex.php;
      include      fastcgi_params;
      }
    #静态文件,nginx自己处理
      location ~ \.(images|javascript|js|css|flash|media|static)$ {
      root d:www/shop_php/shop;
      #过期30天,静态文件不怎么更新,过期可以设大一点,如果频繁更新,则可以设置得小一点。
      expires 30d;
      }
    error_page   500 502 503 504 /50x.html;
      location = /50x.html {
      root   D:www/shop_php/shop;
    }
    }

在浏览器中输入:http://127.0.0.1:90/index.php可以打开。

但是http://127.0.0.1:90/css/index.css打不开

wenhq 发表于 2013-07-04 21:35

静态配置下没这个文件?

maochanglu 发表于 2013-07-07 09:17

      root d:www/shop_php/shop;
      root   D:www/shop_php/shop;

应该是root的配置文件。
但是 就d和D的区别。
页: [1]
查看完整版本: nginx报404