fix: update server configuration

This commit is contained in:
Quinten 2025-10-07 16:40:32 +02:00
parent a2c08739aa
commit c74bebd75b

View File

@ -2,14 +2,12 @@ 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;
root ./www/;
index index.html index.htm;
error_page 400 /400.html;
@ -28,14 +26,14 @@ server {
autoindex off;
root ./static_site/;
index index2.html index.html;
allowed_methods GET POST DELETE UPDATE;
allowed_methods GET POST DELETE;
}
location /uploads {
root /var/www/uploads;
autoindex on;
allowed_methods GET POST;
}
# location /uploads {
# root /var/www/uploads;
# autoindex on;
# allowed_methods GET POST;
# }
location /images {
root ./static_site/img;
@ -44,18 +42,19 @@ server {
allowed_methods GET;
}
cgi_pass /cgi-bin/;
cgi_ext .py .php;
cgi_enabled yes;
cgi_ext .php /usr/bin/php-cgi;
}
server {
listen 8081;
host 127.0.0.1;
server_name localhost;
root /www;
root ./www;
index index.html index2.htm;
error_page 400 /400.html;
error_page 400;
error_page 403 /403.html;
error_page 404 /404.html;
error_page 405 /405.html;
@ -73,19 +72,19 @@ server {
allowed_methods GET POST DELETE;
}
location /2uploads {
root /var/www/uploads;
autoindex on;
allowed_methods GET POST;
}
# 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;
}
# location /2images {
# root /var/www/images;
# autoindex off;
# index index.jpg;
# allowed_methods GET;
# }
cgi_pass /cgi-bin/;
cgi_ext .py .php;
cgi_enabled yes;
cgi_ext .php /usr/bin/php-cgi;
}