git clone https://github.com/henpatsi/webserv.git
cd webserv
make
./webserv [config_name]
server {
[server setting]: [value]
location [route] {
[route setting]: [value]
}
}
host
- ip addressport
name
- name of the serverconnection_timeout
- time (s) until a client times out, after this a 408 response is attempted and the client is disconnectedsession_timeout
- time (s) until a session times out, including this enables sessions through cookiessize_limit
- maximum request body sizeerror_page
- custom error page for all errors (400 and 500 codes), can contain <%ERROR%> which is replaced by the error code
root
- the root path for the route, relative to webservallowedMethods
- request methods allowed by the routedirListing
- if true, GET requests to directories lists their contentindex
- if dirListing is false, GET requests to directories get this file in directoryacceptUpload
- whether uploads to this route through POST requests are accepted or notuploadDir
- the directory to which uploads through POST to this route are storedredirect
- the location to which requests to this route should be redirected to (temporary redirect 307)CGI
- a space separated list of allowed cgi types, defined by extension