server { listen 127.0.0.1:8000 listen 127.0.0.1:8081 server_name example.com www.example.com root ./www client_max_body_size 1M error_page 404 ./www/errors/404.html error_page 500 502 503 504 ./www/errors/50x.html location / { methods GET POST index index.html autoindex off } location /files { methods GET autoindex on } location /upload { methods POST DELETE upload_store ./www/uploads } location /old { return 301 / } location /cgi-bin/python { methods GET POST cgi_extension .py cgi_pass /usr/bin/python3 } location /cgi-bin/php { methods GET POST cgi_extension .php cgi_pass /usr/bin/php-cgi } } server { listen 0.0.0.0:8000 server_name second.local root ./www2 location / { methods GET index index.html } }