config 파일 관련 논의 #1
JuneParkCode
started this conversation in
General
Replies: 1 comment
-
22.11.09
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NGINX의 config 파일을 참고할 것.
https://www.nginx.com/resources/wiki/start/topics/examples/full/
subject 내용
In the configuration file, you should be able to:
• Choose the port and host of each ’server’.
• Setup the server_names or not.
• The first server for a host:port will be the default for this host:port (that means it will answer to all the requests that don’t belong to an other server).
• Setup default error pages.
• Limit client body size.
• Setup routes with one or multiple of the following rules/configuration (routes wont be using regexp):
◦ Define a list of accepted HTTP methods for the route.
◦ Define a HTTP redirection.
◦ Define a directory or a file from where the file should be searched (for example, if url /kapouet is rooted to /tmp/www, url /kapouet/pouic/toto/pouet is /tmp/www/pouic/toto/pouet).
◦ Turn on or off directory listing.
6
Webserv This is when you finally understand why a URL starts with HTTP
◦ Set a default file to answer if the request is a directory.
◦ Execute CGI based on certain file extension (for example .php).
◦ Make the route able to accept uploaded files and configure where they should be saved.
∗ Do you wonder what a CGI is?
∗ Because you won’t call the CGI directly, use the full path as PATH_INFO.
∗ Just remember that, for chunked request, your server needs to unchunked it and the CGI will expect EOF as end of the body.
∗ Same things for the output of the CGI. If no content_length is returned from the CGI, EOF will mark the end of the returned data.
∗ Your program should call the CGI with the file requested as first argument.
∗ The CGI should be run in the correct directory for relative path file access.
∗ Your server should work with one CGI (php-CGI, Python, and so forth).
You must provide some configuration files and default basic files to test and demonstrate every feature works during evaluation.
파싱에 유용한 형식을 고민해볼 필요가 있습니다. NGINX 형식을 그대로 따를 것인지, 아니면 별도의 형식을 취할 것인지...
Beta Was this translation helpful? Give feedback.
All reactions