我要评分
获取效率
正确性
完整性
易理解

Configuring Nginx

  1. Modify the mod_fastdfs.conf file.
    1
    vim /etc/fdfs/mod_fastdfs.conf
    

    Modify lines 40, 53, and 62 as follows:

    1
    2
    3
    tracker_server=210.26.55.190:22122  # IP address and port of the tracker server
    url_have_group_name=true
    store_path0=/home/dfs/storage
    
  2. Modify the nginx.config file.
    1
    vim /usr/local/nginx/conf/nginx.conf
    

    Add the following settings.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    server {
    listen       80;    # The port must be the same as the value of http.server_port in storage.conf.
    server_name  210.26.55.190;
    location ~/group[0-9]/ {
    ngx_fastdfs_module;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
    root   html;
    }
    }
    
  3. Start Nginx.
    /usr/local/nginx/sbin/nginx