45 lines
773 B
Plaintext
45 lines
773 B
Plaintext
|
|
server {
|
|
listen 127.0.0.1:8000
|
|
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
|
|
}
|
|
}
|
|
|