光猫折腾6 用轻量的WebDav提供文件和网页服务

in 日常 with 0 comment

Nginx是不错的选择,至少在空间宝贵的光猫上是这样的

但是对于WebDAV,其实不一定需要nginx,而且很难交叉编译
痛定思痛,我在Github上找到了一个解决方案:WebOtf

index

即使在静态编译下依旧十分小巧(当然,我修改了源码,砍掉了auth)

armbian:weborf:# stat weborf
  File: weborf
  Size: 112768          Blocks: 224        IO Block: 4096   regular file
Device: b302h/45826d    Inode: 798928      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2024-03-24 06:52:50.956406471 +0800
Modify: 2024-03-24 06:52:51.166405867 +0800
Change: 2024-03-24 06:52:51.166405867 +0800
 Birth: 2024-03-24 06:52:50.956406471 +0800
armbian:weborf:# file weborf
weborf: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped

编译也很简单

./configure CC=armv7m-linux-musleabi-gcc --host=arm-linux-gnueabi --prefix=/usr/local/armv7m-linux-musleabi LDFLAGS="-w -s -static"
make

顺便奉上我编译的版本.gz

Responses