Skip to content

Configuration file

Daniel-Alessandros Atack edited this page Jun 8, 2022 · 57 revisions

Syntax

Tables Arguments Scope Purpose
server_name = string ; server Setup the name of the server which determine which block is used for a given request
host = string ; server Setup the host of the server, by default 127.0.0.1 assigned to the first server if undefined
port = int ; server Setups the port listened by the server; by default 3000 assigned to the first server if undefined
index = string ... ; server, location Defines the index file’s name, by default "index.html" if undefined for the first server
root string ; server, location Setups the root path
error_pages int ... = string server, location Setups the error pages
read_timeout = int ; server Customizes the timeout reading a request
client_header_size = int ; server
server_body_size = int ; server
body_max_size = int ; server Maximum size
methods = string ... ; location Setups a list of HTTP methods accepted by the location
rewrite int string string ; location Setups an HTTP redirection with a redirect_code, url, redirect_url; throws an error if the redirect_code isn't 3xx
auto_index on/off ; location Enables directory listing
cgi_enable on/off ; location Enables the use of CGI
cgi_extension = string ... ; location For which file extensions CGI is enabled
cgi_timeout = int ; location Customizes the timeout for a CGI execution
send_file on/off ; location Enables direct copying data from one file descriptor to another instead of writing to a buffer first
file_limit = int ; location Customizes the maximum size of a file in megabytes
max_amount_of_request = int ; server Customizes the maximum amount of requests handled at the same time by the server

Clone this wiki locally