2019年11月6日星期三

Debian 9 搭建Apache2 文件服务器

信息来源
https://blog.csdn.net/li_101357/article/details/78386023

想要打造一款非常便携的文件服务器吗?



下面就来在debian9搭建搭建Apache2 文件服务器

首先 

sudo -i
#安装apache2
apt install apache2

访问vps ip地址检测服务是否正常;

然后编辑
/etc/apache2/sites-available/000-default.conf

增加这段

</VirtualHost>
ServerName localhost:7999
DocumentRoot /var/www/

      <Directory /var/www>
          Options Indexes FollowSymLinks MultiViews
          AllowOverride None
          Order allow,deny
          allow from all
      </Directory>



#设置权限
chmod 775 /var/www

#重启服务
systemctl restart apache2

一台外链轻量级文件服务器就诞生了。

------------下面是改网页访问端口方法:--------------



编辑
/etc/apache2/ports.conf

找到端口并修改

NameVirtualHost *:9000
Listen 9000


没有评论:

发表评论

openwrt在线编译 插件名字查找

openwrt在线编译 https://firmware-selector.staging.immortalwrt.org/ 插件名字查找 https://downloads.staging.immortalwrt.org/releases/23.05.1/packages/x8...