177 lines
3.9 KiB
Plaintext
177 lines
3.9 KiB
Plaintext
error_page 400 ./htdocs/error_pages/400.html;
|
|
error_page 404 ./htdocs/error_pages/404.html;
|
|
error_page 404 ./htdocs/error_pages/404.html;
|
|
error_page 403 ./htdocs/error_pages/403.html;
|
|
error_page 405 ./htdocs/error_pages/405.html;
|
|
error_page 413 ./htdocs/error_pages/413.html;
|
|
error_page 500 ./htdocs/error_pages/500.html;
|
|
error_page 502 ./htdocs/error_pages/502.html;
|
|
error_page 504 ./htdocs/error_pages/504.html;
|
|
|
|
server {
|
|
listen 8085;
|
|
host 0.0.0.0;
|
|
server_name localhost;
|
|
default;
|
|
root htdocs/site-4/παράδειγμα;
|
|
|
|
location / {
|
|
autoindex on;
|
|
index index.html index.htm;
|
|
allowed_methods GET POST DELETE;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
host 0.0.0.0;
|
|
server_name localhost;
|
|
|
|
root ./htdocs/site-1/;
|
|
index index.html index.htm;
|
|
|
|
error_page 400 ./htdocs/error_pages/400.html;
|
|
error_page 404 ./htdocs/error_pages/404.html;
|
|
error_page 404 ./htdocs/error_pages/404.html;
|
|
error_page 403 ./htdocs/error_pages/403.html;
|
|
error_page 405 ./htdocs/error_pages/405.html;
|
|
error_page 413 ./htdocs/error_pages/413.html;
|
|
error_page 500 ./htdocs/error_pages/500.html;
|
|
error_page 502 ./htdocs/error_pages/502.html;
|
|
error_page 504 ./htdocs/error_pages/504.html;
|
|
|
|
# client_max_body_size 1M;
|
|
|
|
location / {
|
|
autoindex off;
|
|
root ./htdocs/site-1/;
|
|
index index2.html index.html;
|
|
allowed_methods GET POST DELETE;
|
|
}
|
|
|
|
# location /uploads {
|
|
# root /var/www/uploads;
|
|
# autoindex on;
|
|
# allowed_methods GET POST;
|
|
# }
|
|
|
|
location /images {
|
|
root ./htdocs/site-1/img;
|
|
autoindex off;
|
|
index index.jpg;
|
|
allowed_methods GET;
|
|
}
|
|
|
|
location /test {
|
|
root ./htdocs/site-1/tester;
|
|
autoindex off;
|
|
index test.html;
|
|
allowed_methods GET;
|
|
}
|
|
|
|
location /redirect {
|
|
redirect 301 http://localhost:8081/;
|
|
allowed_methods GET POST;
|
|
}
|
|
|
|
location /autoindex {
|
|
root ./htdocs/site-1;
|
|
autoindex on;
|
|
allowed_methods GET;
|
|
index index2.html;
|
|
}
|
|
|
|
cgi_enabled yes;
|
|
cgi_handler .php /usr/bin/php-cgi;
|
|
client_max_body_size 10M;
|
|
}
|
|
|
|
server {
|
|
listen 8081;
|
|
host 127.0.0.1;
|
|
server_name localhost;
|
|
|
|
root ./htdocs/site-2/;
|
|
index index.html index2.htm;
|
|
|
|
client_max_body_size 1M;
|
|
|
|
location / {
|
|
autoindex off;
|
|
root ./htdocs/site-2/;
|
|
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_enabled yes;
|
|
cgi_handler .php /usr/bin/php-cgi;
|
|
}
|
|
|
|
server {
|
|
listen 8082;
|
|
host 127.0.0.1;
|
|
server_name localhost;
|
|
|
|
root ./htdocs/site-3/;
|
|
index index.html index2.htm;
|
|
|
|
client_max_body_size 1M;
|
|
|
|
location / {
|
|
autoindex off;
|
|
index index.php;
|
|
allowed_methods GET POST DELETE;
|
|
}
|
|
|
|
cgi_enabled yes;
|
|
cgi_handler .php /usr/bin/php-cgi;
|
|
cgi_handler .cgi;
|
|
}
|
|
|
|
server {
|
|
listen 8083;
|
|
host 127.0.0.1;
|
|
server_name localhost;
|
|
client_max_body_size 100m;
|
|
root ./htdocs/YoupiBanane/;
|
|
index index.html index2.htm;
|
|
|
|
location / {
|
|
root ./htdocs/YoupiBanane/;
|
|
index index.html;
|
|
allowed_methods GET;
|
|
|
|
}
|
|
location /put_test {
|
|
root ./htdocs/YoupiBanane/;
|
|
allowed_methods PUT;
|
|
}
|
|
|
|
location /post_body {
|
|
root ./htdocs/YoupiBanane/;
|
|
client_max_body_size 100m;
|
|
allowed_methods POST;
|
|
|
|
}
|
|
location /directory {
|
|
root ./htdocs/YoupiBanane/;
|
|
index youpi.bad_extension;
|
|
allowed_methods GET POST PUT DELETE;
|
|
}
|
|
|
|
cgi_enabled yes;
|
|
cgi_handler .bla ./ubuntu_cgi_tester;
|
|
} |