avleen/bashttpd
소개
Bash로 작성된 웹 서버
시스템 및 인프라What you can do
- Serves text and HTML files
- Shows directory listings
- Allows for configuration based on the client-specified URI
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- -1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalbashttpd is a simple, configurable web server written in bash
Requirements
bash, any recent version should worksocatornetcatto handle the underlying sockets.- A healthy dose of insanity
Examples
socat TCP4-LISTEN:8080 EXEC:/usr/local/bin/bashttpd
Or
netcat -lp 8080 -e ./bashttpd
Note that in the socat example above, the web server will immediately exit once the first connection closes. If you wish to serve to more than one client - like most servers do, then use the variant:
socat TCP4-LISTEN:8080,fork EXEC:/usr/local/bin/bashttpd
This way, a new process is spawned for each incoming connection.
Getting started
- Running bashttpd for the first time will generate a default configuration file, bashttpd.conf
- Review bashttpd.conf and configure it as you want.
- Run bashttpd using netcat or socat, as listed above.
Features
- Serves text and HTML files
- Shows directory listings
- Allows for configuration based on the client-specified URI
Limitations
- Does not support authentication
- Doesn't strictly adhere to the HTTP spec.
Security
- Only rudimentary input handling. We would not running this on a public machine.
HTTP protocol support
403: Returned when a directory is not listable, or a file is not readable
400: Returned when the first word of the first line is not GET
200: Returned with valid content
Content-type: Bashttpd uses /usr/bin/file to determine the MIME type to sent to the browser
1.0: The server doesn't support Host: headers or other HTTP/1.1 features - it barely supports HTTP/1.0!
As always, your patches/pull requests are welcome!
Testimonials
"If anyone installs that anywhere, they might meet a gruesome end with a rusty fork" --- BasHTTPd creator, maintainer
관련 프로젝트 살펴보기
불러오는 중…