autoindex on
error_page 400 ./error_pages/400.html
error_page 500 ./error_pages/500.html
server {
listen 8080;
host 0.0.0.0;
server_name localhost;
root /var/www/html;
index index.html index.htm;
error_page 400 /400.html;
error_page 404 ./error_pages/404.html;
error_page 403 /403.html;
error_page 404 /404.html;
error_page 405 /405.html;
error_page 413 /413.html;
error_page 500 /500.html;
error_page 502 /502.html;
error_page 504 /504.html;
client_max_body_size 1M;
location / {
autoindex off;
index index.html;
allowed_methods GET POST DELETE;
}
location /uploads {
root /var/www/uploads;
autoindex on;
allowed_methods GET POST;
}
location /images {
root /var/www/images;
autoindex off;
index index.jpg;
allowed_methods GET;
}
cgi_pass /cgi-bin/;
cgi_ext .py .php;
}
server {
listen 8081;
host 127.0.0.1;
server_name mylocal;
root /var/www/html2;
index index.html index2.htm;
error_page 400 /400.html;
error_page 403 /403.html;
error_page 404 /404.html;
error_page 405 /405.html;
error_page 413 /413.html;
error_page 500 /500.html;
error_page 502 /502.html;
error_page 504 /504.html;
client_max_body_size 1M;
location / {
autoindex off;
index index.html;
allowed_methods GET POST DELETE;
}
location /2uploads {
root /var/www/uploads;
autoindex on;
allowed_methods GET POST;
}
location /2images {
root /var/www/images;
autoindex off;
index index.jpg;
allowed_methods GET;
}
cgi_pass /cgi-bin/;
cgi_ext .py .php;
}