2 Star 2 Fork 1

leo / Share

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Share

简单的HTTP静态文件服务器,参考了codeskyblue/gohttpserver,精简了功能。

Preview

启动参数

参数 说明
-h, -help 显示使用帮助
-port 设置服务端口号,默认8088
-prefix 使用反向代理(子路径)时,需要该选项配置前缀
-root 设置共享目录,默认当前目录
-title 设置站点标题,默认"File Server"

【注】参数全部可选

反向代理

NGINX:

location /files/ {
    proxy_pass  http://127.0.0.1:8088/; # 8088为服务的端口号

    proxy_set_header  Host    $host;
    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  X-Forwarded-Proto $scheme;

    client_max_body_size 0;
}

启动参数:

share -prefix /files

Comments ( 0 )

Sign in for post a comment

About

简单的HTTP静态文件服务器 spread retract
Go
MIT
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
Go
1
https://gitee.com/love_linger/Share.git
git@gitee.com:love_linger/Share.git
love_linger
Share
Share
master

Search