Files
42_INT_12_webserv/big.config
2022-08-08 18:06:41 +02:00

124 lines
1.8 KiB
Plaintext

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;
cgi_ext php cgi
}
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/;
}