张三布里斯 发表于 2014-01-17 17:39

提示 unknown directive "ngx_fastdfs_module" in /usr/local/nginx/con

本帖最后由 张三布里斯 于 2014-01-17 17:40 编辑

安装nginx的fastdfs拓展,运行nginx时提示 unknown directive "ngx_fastdfs_module" ,配置文件如下:

#usernobody;
worker_processes1;

#error_loglogs/error.log;
#error_loglogs/error.lognotice;
#error_loglogs/error.loginfo;

#pid      logs/nginx.pid;


events {
    worker_connections1024;
}


http {
    include       mime.types;
    default_typeapplication/octet-stream;

    #log_formatmain'$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_loglogs/access.logmain;

    sendfile      on;
    #tcp_nopush   on;

    #keepalive_timeout0;
    keepalive_timeout65;

    #gzipon;

    server {
      listen       80;
      server_namelocalhost;

      #charset koi8-r;

      #access_loglogs/host.access.logmain;

      location / {
            root   html;
            indexindex.html index.htm;
        }

       location /group1/M00 {
            root /fastdfs/fastdfs_storage/data;
            ngx_fastdfs_module;
    }

      #error_page404            /404.html;

      # redirect server error pages to the static page /50x.html
      #
      error_page   500 502 503 504/50x.html;
      location = /50x.html {
            root   html;
      }

      # proxy the PHP scripts to Apache listening on 127.0.0.1:80
      #
      #location ~ \.php$ {
      #    proxy_pass   http://127.0.0.1;
      #}

      # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
      #
      #location ~ \.php$ {
      #    root         html;
      #    fastcgi_pass   127.0.0.1:9000;
      #    fastcgi_indexindex.php;
      #    fastcgi_paramSCRIPT_FILENAME/scripts$fastcgi_script_name;
      #    include      fastcgi_params;
      #}

      # deny access to .htaccess files, if Apache's document root
      # concurs with nginx's one
      #
      #location ~ /\.ht {
      #    denyall;
      #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_namesomenamealiasanother.alias;

    #    location / {
    #      root   html;
    #      indexindex.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443;
    #    server_namelocalhost;

    #    ssl                  on;
    #    ssl_certificate      cert.pem;
    #    ssl_certificate_keycert.key;

    #    ssl_session_timeout5m;

    #    ssl_protocolsSSLv2 SSLv3 TLSv1;
    #    ssl_ciphersHIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers   on;

    #    location / {
    #      root   html;
    #      indexindex.html index.htm;
    #    }
    #}

}


请大神看下我这配置那里写错了吗?谢谢

张三布里斯 发表于 2014-01-17 18:45

大神也没办法吗?:lol:lol

wujialongcncom 发表于 2015-08-12 15:52

重新 config
重新 make, 然后 make install

happy_fish100 发表于 2015-08-13 17:27

nginx没有把fastdfs模块编译进去吧
扩展模块名:fastdfs-nginx-module
可以到github下载。
页: [1]
查看完整版本: 提示 unknown directive "ngx_fastdfs_module" in /usr/local/nginx/con