-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from saladuit/configparser
Configparser
- Loading branch information
Showing
9 changed files
with
279 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,47 @@ | ||
# https://nginx.org/en/docs/beginners_guide.html | ||
# Global Server Configuration | ||
#global { | ||
# threads 4; | ||
# read_size 1; | ||
# write_size 1; | ||
# default_error_pages /path/to/error_pages/; | ||
#} | ||
# | ||
# Understanding The Comments: | ||
# {nbr} : Limitied to {nbr} Option(s); | ||
# M : Multiple Options; | ||
# B : Binary, aka either On or Off; | ||
# | ||
# R : Required; | ||
# O : Optional; | ||
|
||
# Server Configuration | ||
|
||
server { | ||
port 9696; | ||
host localhost; # Choose the port and host; default for this host:port | ||
server_name lucy_saus; # Setup the server_names or not | ||
client_max_body_size 3M; # Limit client body size | ||
listen localhost:8080; # [M - O] choose a Host:Port combination ; IPv4:{1 - 16bit} ; default: INADDR_ANY:8080 | ||
server_name localhost; # [M - O] Setup the server_names ; [A-Za-z_]* ; default: [EMPTY] | ||
error_dir /error; # [1 - O] Set a directory that has error page ; [/]{1}[A-Za-z_/:w]* ; Default: [EMPTY] | ||
client_max_body_size 3M; # [1 - O] Limit client body size ; [\d]{1,3}[KkMm]? ; Default: 1 mB | ||
|
||
location / { | ||
root /data/www; # [1 - O] Set up the root directory for the server ; [/]{1}[A-Za-z_/:w]* ; Default: /data/www | ||
index index.html; # [1 - O] Set a default file to answer if the request is a directory ; [A-Za-z_/.]* ; Default: index.html | ||
allowed_methods GET; # [M - O] Define a list of accepted HTTP methods for the route; GET/POST/DELETE ; Default: GET | ||
autoindex on; # [B - O] Turn on or off directory listing; on; Default: off | ||
} | ||
|
||
location /python { | ||
root /cgi_bin/python; # already defined; | ||
cgi_path /bin/python3; # [1 - O] Set a Path to where the CGI can find the Binary; [A-Za-z_/.]* ; Default: [EMPTY] | ||
} | ||
|
||
location / { | ||
root /data/www; # Define a directory where the file should be searched | ||
index index.html; # Set a default file to answer if the request is a directory | ||
allow_methods GET POST; # Define a list of accepted HTTP methods for the route | ||
directory_listing off; # Turn on or off directory listing | ||
} | ||
location /images { | ||
root /data/images; # already defined; | ||
allow_methods GET POST; # already defined; | ||
autoindex off; # already defined; | ||
} | ||
|
||
location /upload { | ||
root /data/upload; | ||
allowed_moteds POST DELETE; | ||
} | ||
|
||
location /removed_folder { | ||
return localhost; # [1 - O] Reroute a directory to another URL; URL ; Default: [] | ||
} | ||
|
||
location /images/ { | ||
root /data; # if url /kapouet is rooted to /tmp/www | ||
directory_listing off; # Turn on or off directory listing | ||
} | ||
return {URL}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
#include <ConfigParser.hpp> | ||
#include <Logger.hpp> | ||
#include <Token.hpp> | ||
|
||
void ConfigParser::syntaxCheck(std::vector<Token>::iterator token) | ||
{ | ||
(void)token; | ||
} |
Oops, something went wrong.