Skip to content

malletgaetan/webserv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Start server

Build executable

git clone https://github.com/malletgaetan/webserv/ && cd webserv && make

See help

./webserv

Run the server

./webserv <config_file>

Configuration

Inheritance

A block is said to be the child of another when he's declared in the block of the other like so:

parent_block {
	child_block {
	}
}

All inheritables attributes of parent_block will be set as default for child_block. See the following list to know which attributes are inheritables.

Location block attributes

name syntax description default value inherited
auto_index auto_index <boolean> If HTTP path is a directory, list files and directories false yes
index index <filename> asked path is a directory, auto complete / no
body_limit body_limit <number> client body size shouldn't be greater than body_limit unlimited yes
cgi cgi <extension> <interpreter_path> if path of request end with , will execute asked script with <interpreter_path> and return content yes
root root <filepath> base folder of static files path of webserv executor yes
methods methods <method1> <method2> ... all allowed methods for the current location GET yes
error error <error_nb> <error_filepath> custom error content for code <error_nb> default errors no

Server block attributes

Server block also have access to all Location Block attributes.

name syntax description
server_name server_name request the server host should use the server configuration
listen listen open server on given ports

About

HTTP/1.1 nginx like web server ᕙ(`▽´)ᕗ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published