- compile with
make - run with
webservwithout any options - pick a browser of your choice and visit the server's website by entering the address specified in the
*.conffile (standard is localhost) - have fun! (changes on the configuration file will only be applied after a server restart)
The server can be configured with a configuration-file. This file is either specified at the startup or will be autogenerated by the server if not specified.
- currently we only support one
server:- it can be specified with the keyword
server {...} - the server allows following parameters:
server_namesspecifies server-addressescgi_extspecifies of the extenstion of the cgi'scgi_binmaps extensions to binariescgi_methodsmethods allowed on CGI requestscgi_rootspecifies path in which requests are always directedportspecifies ports to listen tolocpredeclares the locationserror_pagesspecifies the pages rendered depending on the error code returnedaccept_filesmanages the access right to upload filesrootspecifies the root folder of the serverindexspecifies the default file of the serveruploaddetermine specific folder to store files uploaded by defaultclient_max_body_size_specifies the size payload sent by the clientlocationcan be specified further (after declaration only!):directory_listinglists the files/folders of the locationrootspecifies the root folder of the locationuploaddetermine specific folder to store files uploaded in the locationdefault_filespecifies the default file of the locationmethods[GET / POST / DELETE] specifies the methods allowed of the locationredirectspecifies the path where requests should be redirected to
- it can be specified with the keyword
- comment with
# comment to be ignored by the parser - a option is legal when formatted like:
<option> : <input> , <input2> ;or<option> { <input> , <input2> } - mixing
{}and: ;will result in a parser error - whitespaces and newline are handled the same
- missing any delimiter results in undefined behaviour
The config file can be changed in the Makefile or should be set as an argument.
PHP should be installed if you want to access the directory listing, indeed the path to it should be set up in directory_listing.php (default path : /usr/bin/php).