fix: update server configuration
This commit is contained in:
parent
a2c08739aa
commit
c74bebd75b
@ -2,14 +2,12 @@ autoindex on
|
|||||||
error_page 400 ./error_pages/400.html
|
error_page 400 ./error_pages/400.html
|
||||||
error_page 500 ./error_pages/500.html
|
error_page 500 ./error_pages/500.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8080;
|
||||||
host 0.0.0.0;
|
host 0.0.0.0;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
root /var/www/html;
|
root ./www/;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
|
|
||||||
error_page 400 /400.html;
|
error_page 400 /400.html;
|
||||||
@ -28,14 +26,14 @@ server {
|
|||||||
autoindex off;
|
autoindex off;
|
||||||
root ./static_site/;
|
root ./static_site/;
|
||||||
index index2.html index.html;
|
index index2.html index.html;
|
||||||
allowed_methods GET POST DELETE UPDATE;
|
allowed_methods GET POST DELETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /uploads {
|
# location /uploads {
|
||||||
root /var/www/uploads;
|
# root /var/www/uploads;
|
||||||
autoindex on;
|
# autoindex on;
|
||||||
allowed_methods GET POST;
|
# allowed_methods GET POST;
|
||||||
}
|
# }
|
||||||
|
|
||||||
location /images {
|
location /images {
|
||||||
root ./static_site/img;
|
root ./static_site/img;
|
||||||
@ -44,18 +42,19 @@ server {
|
|||||||
allowed_methods GET;
|
allowed_methods GET;
|
||||||
}
|
}
|
||||||
|
|
||||||
cgi_pass /cgi-bin/;
|
cgi_enabled yes;
|
||||||
cgi_ext .py .php;
|
cgi_ext .php /usr/bin/php-cgi;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8081;
|
listen 8081;
|
||||||
host 127.0.0.1;
|
host 127.0.0.1;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
root /www;
|
root ./www;
|
||||||
index index.html index2.htm;
|
index index.html index2.htm;
|
||||||
|
|
||||||
error_page 400 /400.html;
|
error_page 400;
|
||||||
error_page 403 /403.html;
|
error_page 403 /403.html;
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
error_page 405 /405.html;
|
error_page 405 /405.html;
|
||||||
@ -73,19 +72,19 @@ server {
|
|||||||
allowed_methods GET POST DELETE;
|
allowed_methods GET POST DELETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /2uploads {
|
# location /2uploads {
|
||||||
root /var/www/uploads;
|
# root /var/www/uploads;
|
||||||
autoindex on;
|
# autoindex on;
|
||||||
allowed_methods GET POST;
|
# allowed_methods GET POST;
|
||||||
}
|
# }
|
||||||
|
|
||||||
location /2images {
|
# location /2images {
|
||||||
root /var/www/images;
|
# root /var/www/images;
|
||||||
autoindex off;
|
# autoindex off;
|
||||||
index index.jpg;
|
# index index.jpg;
|
||||||
allowed_methods GET;
|
# allowed_methods GET;
|
||||||
}
|
# }
|
||||||
|
|
||||||
cgi_pass /cgi-bin/;
|
cgi_enabled yes;
|
||||||
cgi_ext .py .php;
|
cgi_ext .php /usr/bin/php-cgi;
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user