nginx搭建文件共享服务器
打开nginx.conf 配置文件进行修改如下
server { listen 8080; server_name localhost; #charset koi8-r; autoindex on; # 显示目录 autoindex_exact_size off; # 显示文件 简短大小 autoindex_localtime on; # 显示文件时间 root share; #access_log logs/host.access.log main; # location / { # root ../www/s/; # index index.html index.htm; # }
重启nginx,打开浏览器 会获得如下的文件共享页面,点击链接即可下载
Index of /
../ BuildTools/ 24-Oct-2019 09:54 - go/ 24-Oct-2019 09:54 - - uniy5.6.4/ 24-Oct-2019 09:54 - BabeLua For 2013 V3.2.2.0.vsix 18-Feb-2019 09:28 3M BabeLua For 2015 V3.2.2.0.vsix 18-Feb-2019 09:28 4M Git-2.23.0-64-bit.exe 21-Aug-2019 16:25 45M TianTianSetup-v1.4.1047-full.exe 19-Mar-2018 10:06 317M TortoiseSVN-1.12.2.28653-x64-svn-1.12.2 (1).msi 21-Aug-2019 16:29 19M VSCodeUserSetup-x64-1.37.1.exe 21-Aug-2019 16:19 51M android-ndk-r16b-windows-x86_64.zip 27-May-2019 21:00 690M cn_windows_10_consumer_edition_version_1803_upd..> 25-Aug-2018 16:49 5G vs2015.pro_chs.iso 14-Oct-2019 11:49 4G