diff --git a/config/default.conf b/config/default.conf index 78e8453..b9a6718 100644 --- a/config/default.conf +++ b/config/default.conf @@ -2,21 +2,23 @@ server { listen 8080; server_name localhost; root ./www; - client_max_body_size 10000; + client_max_body_size 10M; location / { allowed_methods GET POST DELETE; index index.html; - autoindex on; + autoindex off; } location /upload { - allowed_methods POST; + allowed_methods POST DELETE; + upload_store ./www/uploads; } - location /cgi-bin/ { + location /cgi-bin { allowed_methods GET POST; - fastcgi_pass 127.0.0.1:9000; + cgi .py /usr/bin/python3; } + include error.conf; -} \ No newline at end of file +} diff --git a/config/error.conf b/config/error.conf index 33698a7..738e5c4 100644 --- a/config/error.conf +++ b/config/error.conf @@ -1,9 +1,6 @@ -error_page 301 /301.html; error_page 400 /400.html; -error_page 401 /401.html; error_page 403 /403.html; error_page 404 /404.html; error_page 405 /405.html; error_page 413 /413.html; -error_page 501 /501.html; -error_page 500 502 503 504 /50x.html; \ No newline at end of file +error_page 500 502 503 504 /50x.html;