https://github.com/songgao/static
A super simple yaml-configured static file server.
https://github.com/songgao/static
go web
Last synced: about 1 year ago
JSON representation
A super simple yaml-configured static file server.
- Host: GitHub
- URL: https://github.com/songgao/static
- Owner: songgao
- License: bsd-3-clause
- Created: 2016-03-13T22:06:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-02T07:24:29.000Z (over 9 years ago)
- Last Synced: 2025-04-23T12:58:46.181Z (about 1 year ago)
- Topics: go, web
- Language: Go
- Size: 4.88 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# static
`static` is a super simple yaml-configured static file server that serves directories without authentication (over HTTP and HTTPS), or with HTTP Basic Authentication (over HTTPS only).
## Usage
```
$ ./static -h
Usage of ./static:
-config string
path to configuration file
-gen-config
generate example config file and print to stdout
```
## Example Configuration
```
$ ./static -gen-config
logging: false
http_laddr: :80
https_laddr: :443
tls_cert_path: /etc/blah/example.cert
tls_key_path: /etc/blah/example.key
public_dirs:
- dir_path: /etc/www/pub1.com
http_path: /pub1/
- dir_path: /etc/www/pub2
http_path: /pub2/
authenticated_dirs:
- dir_path: /etc/www/secret
http_path: /secret/
usernames:
- john
- ha
users:
ha: eioj
huh: fjweoifj
john: efjio
```