libevent http-server示例

wget https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
tar xvzf libevent-2.1.12-stable.tar.gz -C .
cd libevent-2.1.12-stable
mkdir cmake-build-debug
cd cmake-build-debug
cmake ../ -DCMAKE_BUILD_TYPE=Debug
make

在sample目录下创建htdocs目录

libevent http-server示例_第1张图片

* sample/htdocs/index.html



    
    
    
    libevent http-server




This is libevent http-server test.

配置远程服务器

libevent http-server示例_第2张图片

https://my.vultr.com/_images/flags/flagsm_il.png

libevent http-server示例_第3张图片

 http-server -p 18080 -v htdocs

启动服务

libevent http-server示例_第4张图片

libevent http-server示例_第5张图片

你可能感兴趣的:(http,网络协议,网络)