
16 changed files with 298 additions and 4 deletions
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
FROM nginx:latest |
||||
|
||||
COPY ./etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf |
||||
COPY ./html /usr/share/nginx/html |
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
server { |
||||
listen 80; |
||||
listen [::]:80; |
||||
server_name localhost; |
||||
|
||||
#access_log /var/log/nginx/host.access.log main; |
||||
|
||||
root /usr/share/nginx/html; |
||||
index index.html index.htm; |
||||
|
||||
|
||||
location / { |
||||
try_files $uri $uri/ =404; |
||||
} |
||||
|
||||
location /cgi-bin/ { |
||||
fastcgi_pass backend-fcgiwrap2:9000; |
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name; |
||||
fastcgi_param DOCUMENT_ROOT $document_root; |
||||
include /etc/nginx/fastcgi_params; |
||||
} |
||||
|
||||
#error_page 404 /404.html; |
||||
|
||||
# redirect server error pages to the static page /50x.html |
||||
# |
||||
error_page 500 502 503 504 /50x.html; |
||||
location = /50x.html { |
||||
root /usr/share/nginx/html; |
||||
} |
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80 |
||||
# |
||||
#location ~ \.php$ { |
||||
# proxy_pass http://127.0.0.1; |
||||
#} |
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
||||
# |
||||
#location ~ \.php$ { |
||||
# root html; |
||||
# fastcgi_pass 127.0.0.1:9000; |
||||
# fastcgi_index index.php; |
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; |
||||
# include fastcgi_params; |
||||
#} |
||||
|
||||
# deny access to .htaccess files, if Apache's document root |
||||
# concurs with nginx's one |
||||
# |
||||
#location ~ /\.ht { |
||||
# deny all; |
||||
#} |
||||
} |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Simple bank</title> |
||||
</head> |
||||
<body> |
||||
<p>Добавляем клиента</p> |
||||
<form action="/cgi-bin/add-client.py" method="post"> |
||||
<input type="text" id="name" name="user_name"> |
||||
<input type="submit" value="Submit"> |
||||
</form> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Simple bank</title> |
||||
</head> |
||||
<body> |
||||
<p>Изменяем количество денег у клиента (укажите Имя, +/-n денег)</p> |
||||
<form action="/cgi-bin/change-client-money.py" method="post"> |
||||
<input type="text" id="name" name="user_name"> |
||||
<input type="text" id="change" name="change"> |
||||
<input type="submit" value="Submit"> |
||||
</form> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Simple bank</title> |
||||
</head> |
||||
<body> |
||||
<p>Закрываем счёт клиента клиента</p> |
||||
<form action="/cgi-bin/delete-client.py" method="post"> |
||||
<input type="text" id="name" name="user_name"> |
||||
<input type="submit" value="Submit"> |
||||
</form> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Simple bank</title> |
||||
</head> |
||||
<body> |
||||
<p>Привет! (2 сервер)</p> |
||||
<a href="add-client.html">Зарегистрировать нового клиента</a> |
||||
<a href="/cgi-bin/show-all.py">Показать список клиентов</a> |
||||
<a href="/change-client-money.html">Изменить количество денег у клиента</a> |
||||
<a href="/delete-client.html">Закрыть счёт клиента</a> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,4 @@
@@ -0,0 +1,4 @@
|
||||
FROM nginx:latest |
||||
|
||||
COPY ./etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf |
||||
COPY ./html /usr/share/nginx/html |
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
server { |
||||
listen 80; |
||||
listen [::]:80; |
||||
server_name localhost; |
||||
|
||||
#access_log /var/log/nginx/host.access.log main; |
||||
|
||||
root /usr/share/nginx/html; |
||||
index index.html index.htm; |
||||
|
||||
|
||||
location / { |
||||
try_files $uri $uri/ =404; |
||||
} |
||||
|
||||
location /cgi-bin/ { |
||||
fastcgi_pass backend-fcgiwrap3:9000; |
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name; |
||||
fastcgi_param DOCUMENT_ROOT $document_root; |
||||
include /etc/nginx/fastcgi_params; |
||||
} |
||||
|
||||
#error_page 404 /404.html; |
||||
|
||||
# redirect server error pages to the static page /50x.html |
||||
# |
||||
error_page 500 502 503 504 /50x.html; |
||||
location = /50x.html { |
||||
root /usr/share/nginx/html; |
||||
} |
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80 |
||||
# |
||||
#location ~ \.php$ { |
||||
# proxy_pass http://127.0.0.1; |
||||
#} |
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
||||
# |
||||
#location ~ \.php$ { |
||||
# root html; |
||||
# fastcgi_pass 127.0.0.1:9000; |
||||
# fastcgi_index index.php; |
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; |
||||
# include fastcgi_params; |
||||
#} |
||||
|
||||
# deny access to .htaccess files, if Apache's document root |
||||
# concurs with nginx's one |
||||
# |
||||
#location ~ /\.ht { |
||||
# deny all; |
||||
#} |
||||
} |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Simple bank</title> |
||||
</head> |
||||
<body> |
||||
<p>Добавляем клиента</p> |
||||
<form action="/cgi-bin/add-client.py" method="post"> |
||||
<input type="text" id="name" name="user_name"> |
||||
<input type="submit" value="Submit"> |
||||
</form> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Simple bank</title> |
||||
</head> |
||||
<body> |
||||
<p>Изменяем количество денег у клиента (укажите Имя, +/-n денег)</p> |
||||
<form action="/cgi-bin/change-client-money.py" method="post"> |
||||
<input type="text" id="name" name="user_name"> |
||||
<input type="text" id="change" name="change"> |
||||
<input type="submit" value="Submit"> |
||||
</form> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Simple bank</title> |
||||
</head> |
||||
<body> |
||||
<p>Закрываем счёт клиента клиента</p> |
||||
<form action="/cgi-bin/delete-client.py" method="post"> |
||||
<input type="text" id="name" name="user_name"> |
||||
<input type="submit" value="Submit"> |
||||
</form> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>Simple bank</title> |
||||
</head> |
||||
<body> |
||||
<p>Привет! (3 сервер)</p> |
||||
<a href="add-client.html">Зарегистрировать нового клиента</a> |
||||
<a href="/cgi-bin/show-all.py">Показать список клиентов</a> |
||||
<a href="/change-client-money.html">Изменить количество денег у клиента</a> |
||||
<a href="/delete-client.html">Закрыть счёт клиента</a> |
||||
</body> |
||||
</html> |
||||
|
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
FROM nginx:latest |
||||
|
||||
RUN rm /etc/nginx/conf.d/default.conf |
||||
COPY ./etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf |
||||
|
Loading…
Reference in new issue