Nginx 快速搭建文件服务器 发表于 2020-08-07 分类于 snapshot Nginx 快速搭建文件服务器 OS: ubuntu:16.04 1. Installationscript1[sudo] apt install nginx 2. Configurationscript1[sudo] vim /etc/nginx/sites-enabled/default with config: script1234567891011server { listen 80 default_server; listen [::]:80 default_server; root /mnt/volume_sgp1_01; # The shared file path server_name 128.199.80.31; location / { autoindex on; # 索引 autoindex_exact_size on; # 显示文件大小 autoindex_localtime on; # 显示文件时间 }} 3. Applyscript123[sudo] chmod -R /mnt/volume_sgp1_01[sudo] service nginx reload[sudo] service nginx restart 4. Closescript1[sudo] service nginx stop