this is a http server written in java and i call it Black
#Features :
- static file serving
- get and post method
- common http status code
- fastCGI
- virtual host based on port
- access log and error log
- configuration
- shell scripts management
#Performance : static file serving | script file serving(using php-fpm) nginx 15000 | 9000 Black 2300 | 1200
#Install :
- make sure you have the java environment
- download the source code from github
- modify the configuration file server.conf.xml set the server directory and log file , notice that you must create the log file first and make sure they have the right access.
- make sure your web site file is in the right directory that you have configured
- modify the script script/server.sh , change the DIR
variable to your own dir, and the run
./server.sh start
to start your server
#Why choose Black :
if you want to build a high performance web site , obviously,
Black is not what you want. but Black is suitable for two use :
- embeded in android apps
cause Black is light-weight , and has totally 3000+ lines of code , and can serve relatively fast and stable. so if your android app needs a small server on it, Black will be ok. - study the priciple of http server
the original purpose of me to write this server is to study the priciple of web server , so if you have just the same purpose with me , Black wont let you down .