well i think i have the Config Parser working and pretty clean, there might be a few tweaks here and there but looks good, now to integrate it with Webserv
This commit is contained in:
122
big.config
Normal file
122
big.config
Normal file
@@ -0,0 +1,122 @@
|
||||
server {
|
||||
server_name webserv;
|
||||
listen 0.0.0.0:4242;
|
||||
|
||||
root ./www/html;
|
||||
|
||||
allow_methods GET;
|
||||
|
||||
autoindex on;
|
||||
index index.html index2.html;
|
||||
client_body_limit 4096;
|
||||
|
||||
error_page 404 405 ./www/html/error/error.html;
|
||||
error_page 500 ./www/html/error/error2.html;
|
||||
|
||||
location /board {
|
||||
allow_methods GET;
|
||||
root ./www/html;
|
||||
}
|
||||
|
||||
location /board/content {
|
||||
allow_methods GET POST DELETE;
|
||||
root ./www/html/contents;
|
||||
index board.html;
|
||||
cgi_info .php php-cgi;
|
||||
}
|
||||
|
||||
location /cgi {
|
||||
allow_methods GET POST;
|
||||
cgi_info php php-fpm;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name another_webserv;
|
||||
listen 0.0.0.0:4242;
|
||||
|
||||
root ./www/html;
|
||||
|
||||
allow_methods GET;
|
||||
|
||||
client_body_limit 256;
|
||||
|
||||
location /board {
|
||||
allow_methods GET;
|
||||
root ./www/html;
|
||||
}
|
||||
|
||||
location /board/content {
|
||||
allow_methods GET POST DELETE;
|
||||
root ./www/html/contents;
|
||||
}
|
||||
|
||||
location /cgi {
|
||||
allow_methods GET POST;
|
||||
cgi_info php php-fpm;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name webserv;
|
||||
listen 0.0.0.0:4243;
|
||||
|
||||
root ./www/html;
|
||||
index index.html;
|
||||
|
||||
allow_methods GET;
|
||||
|
||||
autoindex off;
|
||||
client_body_limit 256 ;
|
||||
recv_timeout 6;
|
||||
send_timeout 6;
|
||||
|
||||
location /board {
|
||||
allow_methods GET DELETE;
|
||||
root ./www/html;
|
||||
}
|
||||
|
||||
location /board/post {
|
||||
allow_methods POST;
|
||||
root ./www/html/contents;
|
||||
}
|
||||
|
||||
location /cgi {
|
||||
allow_methods GET;
|
||||
cgi_info cgi_tester hello world;
|
||||
}
|
||||
}
|
||||
server {
|
||||
server_name webserv;
|
||||
listen 0.0.0.0:4243;
|
||||
|
||||
root ./www/html;
|
||||
index index.html;
|
||||
|
||||
allow_methods GET;
|
||||
|
||||
autoindex off;
|
||||
client_body_limit 256 ;
|
||||
recv_timeout 6;
|
||||
send_timeout 6;
|
||||
|
||||
location /board {
|
||||
allow_methods GET DELETE;
|
||||
root ./www/html;
|
||||
}
|
||||
|
||||
location /board/post {
|
||||
allow_methods POST;
|
||||
root ./www/html/contents;
|
||||
}
|
||||
|
||||
location /cgi {
|
||||
allow_methods GET;
|
||||
cgi_info cgi_tester hello world;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:8000;
|
||||
return 301 https://profile.intra.42.fr/;
|
||||
}
|
||||
Reference in New Issue
Block a user