Skip to content
forked from oaizab/Webserv

This project is about writing your own HTTP server.

Notifications You must be signed in to change notification settings

Ziko909/Webserv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webserv Banner

Webserv is a small and effective web server created in C++. It gives a strong base for hosting web applications and delivering fixed content. Because it is easy to use and works well, Webserv can be used for many different purposes.

Features

  • HTTP/1.1 Support: Webserv supports the HTTP/1.1 protocol, allowing seamless communication with clients.
  • Static Content: Serve static files such as HTML, CSS, JavaScript, images, and more, making it easy to host static websites.
  • Dynamic Content: Handle dynamic content by supporting common scripting languages such as PHP, Python, and Perl.
  • Virtual Hosting: Configure and host multiple websites using virtual hosting, allowing you to serve multiple domains from a single server.
  • Request Routing: Define custom request routes to handle different URLs and paths based on your application's specific needs.

For more information on Webserv's features, see the Webserv Wiki.

Getting Started

To get started with Webserv, follow these steps:

  1. Clone the Repository: Clone the Webserv repository from GitHub:
git clone https://github.com/oaizab/Webserv.git
  1. Build the Server: Navigate to the project directory and build the server in release mode using make:
cd Webserv
make RELEASE=1
  1. Configuration: Customize the server's configuration by modifying the webserv.conf or creating a brand new config file. Configure the server's ports, virtual hosts, and any other settings according to your requirements. For more information on configuring the server, see the Configuration File Wiki

  2. Start the Server: Launch the server by running the built executable, you can use the default config file (config/webserv.conf) or specify a custom config file:

./webserv # Uses the default config file (config/webserv.conf)
./webserv /path/to/your/config-file.conf # Uses a custom config file
  1. Access the Server: You can now access the server by opening a web browser and navigating to http://localhost:port, where port is the configured port number in the configuration file (Assuming the web server is configured to listen on localhost).

Here's a quick example of a simple configuration file that serves static content:

server {
	listen 8080;
	server_name localhost;

	location / {
		root /path/to/your/static/files;
	}
}

Contact

If you have any questions, suggestions, or feedback, feel free to reach out to the project team.

Releases

No releases published

Packages

No packages published

Languages

  • C++ 91.4%
  • HTML 5.5%
  • CSS 1.2%
  • Makefile 1.0%
  • Shell 0.4%
  • PHP 0.3%
  • Python 0.2%