Git Product home page Git Product logo

mypoorwebserver's Introduction

一款可运行的基于C++11 实现的HTTP服务器

1、简介

1、由来

该项目是基于C++ 实现的HTTP服务器,也就是那种烂大街的WebServe服务器,不过由于是自己动手做的,所以还是很有意义的就上传上来了。

该项目也是阿秀自己在2020年找工作时简历上的第二个项目。

关于项目的详细功能介绍请看该文章的项目描述处:一份百投百中的计算机校招简历是如何迭代足足26版的?

(如果有需要个人文档的同学可以看一下文末处,有简历下载方式)

2、其余

如果还有对该项目有疑问的同学可以加我个人微信:aXiu_go,我会在工作之余进行免费答疑。

最好在看过文末的两本书即《TCPIP网络编程》和《Linux高性能服务器编程》或者对于C++网络编程有一定了解后,再来进行实践本项目。

2、编译

请严格按照下面步骤进行编译

1、编译准备工作

文件夹中的 post.html 以及 post.cgi 文件需要一定的权限才可以执行。

所以需要先进行权限给予。

第一步、克隆项目并给予足够权限,打开命令行依次输入下述命令:

git clone  https://github.com/forthespada/MyPoorWebServer

cd  httpdocs

sudo chmod 600 test.html

sudo chmod 600 post.html

sudo chmod +X post.cgi

在进行sudo命令时,需要输入Linux下的sudo命令。

如下图所示:

如果忘记自己设置的sudo密码,可以按照如下教程进行密码重置:sudo密码重置

2、编译执行

依次输入下述命令即可。

cd  ../

make

./myhttp

3、整体过程图

1、项目默认端口号是6379,如像下图地址栏所示,默认显示的界面是是test.html界面。

2、运行成功后默认显示的为test.html界面,同时同一路径下还有 post.html界面,可以将地址栏的“test.html”改成“post.html”来进行查看。

4、整体框架图

6、参考资料

《TCPIP网络编程》-韩国-尹圣雨

《Linux高性能服务器编程》-**-游双

https://www.cnblogs.com/qiyeboy/p/6296387.html

https://www.jianshu.com/p/18cfd6019296

mypoorwebserver's People

Contributors

forthespada avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.