Giter VIP home page Giter VIP logo

web-server's Introduction

C++ Web-Server

Contributors

Name Email
Georgi Baghdasaryan [email protected]

Project Description

A simple C++ Web Server

Usage

First, we need to download and build this project. Follow the following steps to do so:

$ git clone https://github.com/baghdasaryan/Web-Server.git
$ cd Web-Server
$ make

make will build the executable file, server, in the current directory.

Now, you can start the program:

$ ./server

By default, the program will start an HTTP server on port 2048 and uses public folder (located in current directory) as the DocumentRoot. DocumentRoot is the root folder where the server will search for requested files

This server will be and files in public folder (located in current directory).

Typically, a document called index.html will be served when a directory is requested without a file name being specified. For example, if DocumentRoot is set to /var/www/html and a request is made for http://www.example.com/work/, the file /var/www/html/work/index.html will be served to the client.

When an actual file is being requested, the server will try to find it on the specified path relative to the DocumentRoot. If a file can be found - it will be returned, otherwise server will return an error.

This server is capable of serving image files (*.img, *.jpeg, *.jpg) HTML files (*.html) as well as simple text files.

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.