如何将linux服务器作为文件服务器

在开发过程中想要使用linux服务器作为文件服务器,可以通过 IP+文件名来获取文件信息,比如http://localhost/banner/a.jpg。设置过程如下

1.安装apache2

sudo apt-get install apache2

2.修改网页服务器的配置文件

cd /etc/apache2/sites-available
vim 000-default.conf #该文件中存放的是配置信息

修改该文件中的红框内容

 3.重启apache2

sudo /etc/init.d/apache2 restart

4.此时在浏览器中输入IP地址 即可查看指定路径下的文件信息http://IPS/

原文地址:https://www.cnblogs.com/fengxm/p/7384812.html