To give you an idea, I deleted the project based on the C++ version, leaving only the C-based project I wrote before. If you can rewrite it into the C++ version based on C, it will become your project.
It can still run smoothly according to the steps in [2. Compile], you can try it yourself~
This project is an HTTP server implemented based on C++, which is the kind of crappy WebServe server. However, since I made it myself, it still makes sense to upload it.
This project is also the second project on Axiu’s resume when she looks for a job in 2020.
For a detailed introduction to the project’s functions, please see the project description of this article: How does a successful computer school recruitment resume go through 26 iterations?
(If there are students who need a resume template, you can look at the end of the above article for my personal resume template download method)
If you have any questions about this project, you can add me on WeChat: coderxiu2 , and I will answer questions for free after work.
It is best to practice this project after reading the two books at the end of the article, namely "TCPIP Network Programming" and "Linux High-Performance Server Programming" or having a certain understanding of C++ network programming.
Please strictly follow the steps below to compile
The post.html and post.cgi files in the folder require certain permissions before they can be executed.
So permission needs to be given first.
The first step is to clone the project and give sufficient permissions, open the command line and enter the following commands in sequence:
git clone https: //github.com/forthespada/MyPoorWebServer
cd httpdocs
sudo chmod 600 test . html
sudo chmod 600 post . html
sudo chmod + X post . cgi
When executing the sudo command, you need to enter the sudo command under Linux.
As shown below:
If you forget the sudo password you set, you can follow the following tutorial to reset the password: sudo password reset
Just enter the following commands in sequence.
cd ../
make
./ myhttp
1. The default port number of the project is 6379. As shown in the address bar in the figure below, the default interface displayed is the test.html interface.
2. After successful operation, the test.html interface will be displayed by default. At the same time, there is also the post.html interface under the same path. You can change " test.html " in the address bar to " post.html " to view it.
"TCPIP Network Programming"-South Korea-Yin Shengyu
"Linux High-Performance Server Programming"-China-Youshuang
https://www.cnblogs.com/qiyeboy/p/6296387.html
https://www.jianshu.com/p/18cfd6019296