Centos6.10-FastDFS-Storage-Nginx配置
nginx+fastdfs-nginx-module 安装此处省略。
1.进入工作目录
cd /usr/local/nginx/conf
2.创建子目录
mkdir configs
3.创建storage配置
cd configs
vi storage.conf
#新增dfs-storage站点配置 server { listen 9100; #对应之前tracker.conf开放的端口号 server_name localhost; location / { root html; index index.html index.htm; } location ~/group([0-9])/M00 { ngx_fastdfs_module; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
4.引入configs/storege.conf配置
cd /usr/local/nginx/conf
vi nginx.conf
5.重启nginx
nginx -s reload
6.访问验证