Configuring Nginx
- Modify the mod_fastdfs.conf file.
1vim /etc/fdfs/mod_fastdfs.confModify 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
- Modify the nginx.config file.
1vim /usr/local/nginx/conf/nginx.confAdd 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; } }
- Start Nginx.
/usr/local/nginx/sbin/nginx
Parent topic: Deploying FastDFS on a Single Node