Skip to content

Commit

Permalink
Added new files
Browse files Browse the repository at this point in the history
  • Loading branch information
artsem-makhnach committed Oct 5, 2017
1 parent fc75450 commit f1a506c
Show file tree
Hide file tree
Showing 13 changed files with 406 additions and 71 deletions.
41 changes: 41 additions & 0 deletions conf/backend.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
server {
listen 8080;
server_name 192.168.122.18;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html;
index index.html;
}

location /pictures {
root html;
try_files $uri /resources/pictures/01.jpg;
}


location /status {
vhost_traffic_status_display;
vhost_traffic_status_display_format html;
allow 192.168.122.18;
deny all;
}

location /admin {
auth_basic "restricted";
auth_basic_user_file /home/artsem_makhnach/nginx/conf/htpasswd;
try_files $uri /admin.html;
}


error_page 404 /404.html;


error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
1 change: 1 addition & 0 deletions conf/htpasswd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
admin:$apr1$9glT73Aj$OuNn/JHWyLEUgszi/uAyz/
114 changes: 69 additions & 45 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ events {
http {
include mime.types;
default_type application/octet-stream;


vhost_traffic_status_zone;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
Expand All @@ -29,54 +31,76 @@ http {

#keepalive_timeout 0;
keepalive_timeout 65;

include /home/artsem_makhnach/nginx/conf/backend.conf;

#gzip on;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html;
index index.html index.htm;
}

#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 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;
#}
}
# server {
# listen 8080;
# server_name 192.168.122.18;
#
# #charset koi8-r;
#
# #access_log logs/host.access.log main;
#
# location / {
# root html;
# index index.html;
# }
#
# location /pictures {
# root html;
# try_files $uri /resources/pictures/01.jpg;
# }
#
#
# location /status {
# vhost_traffic_status_display;
# vhost_traffic_status_display_format html;
# allow 192.168.122.18;
# deny all;
# }
#
# location /admin {
# auth_basic "restricted";
# auth_basic_user_file /home/artsem_makhnach/nginx/conf/htpasswd;
# try_files $uri /admin.html;
# }
#
#
# #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 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;
# #}
# }


# another virtual host using mix of IP-, name-, and port-based configuration
Expand Down
1 change: 1 addition & 0 deletions html/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>My custom 404 error</h1>
1 change: 1 addition & 0 deletions html/admin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Restricted admin stuff</h1>
Binary file added html/bodyback.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions html/err.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Custon error message on LB</h1>
137 changes: 112 additions & 25 deletions html/index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,112 @@
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>
<html>

<head>
<title>Main page</title>
<style type="text/css">
body {
background: #fff url(./bodyback.png) left top;
}
/* SECTIONS */
.section {
clear: both;
padding: 0px;
margin: 50 auto;
position: relative;
width: 60%;
}

/* COLUMN SETUP */
.col {
display: block;
float:left;
margin: 1% 0 1% 0.7%;
}
.col:first-child { margin-left: 0; }

/* GROUPING */
.group:before,
.group:after { content:""; display:table; }
.group:after { clear:both;}
.group { zoom:1; /* For IE 6/7 */ }
/* GRID OF FOUR */
.span_4_of_4 {
width: 100%;
}
.span_3_of_4 {
width: 74.82%;
}
.span_2_of_4 {
width: 49.65%;
}
.span_1_of_4 {
width: 24.47%;
}

/* GO FULL WIDTH BELOW 480 PIXELS */
@media only screen and (max-width: 480px) {
.col { margin: 1% 0 1% 0%; }
.span_1_of_4, .span_2_of_4, .span_3_of_4, .span_4_of_4 { width: 100%; }
}

/* BUTTON */
.myButton {
-moz-box-shadow:inset 0px 1px 0px 0px #54a3f7;
-webkit-box-shadow:inset 0px 1px 0px 0px #54a3f7;
box-shadow:inset 0px 1px 0px 0px #54a3f7;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #007dc1), color-stop(1, #0061a7));
background:-moz-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-webkit-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-o-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-ms-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:linear-gradient(to bottom, #007dc1 5%, #0061a7 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#007dc1', endColorstr='#0061a7',GradientType=0);
background-color:#007dc1;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
border:1px solid #124d77;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:13px;
padding:6px 24px;
text-decoration:none;
text-shadow:0px 1px 0px #154682;
}
.myButton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #0061a7), color-stop(1, #007dc1));
background:-moz-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-webkit-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-o-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-ms-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:linear-gradient(to bottom, #0061a7 5%, #007dc1 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0061a7', endColorstr='#007dc1',GradientType=0);
background-color:#0061a7;
}
.myButton:active {
position:relative;
top:1px;
}

</style>
</head>

<body>
<div class="section group">
<div class="col span_1_of_4">
<a href="./status" class="myButton">Status</a>
</div>
<div class="col span_1_of_4">
<a href="./admin" class="myButton">Admin</a>
</div>
<div class="col span_1_of_4">
<a href="./pictures/01.jpg" class="myButton">JPG</a>
</div>
<div class="col span_1_of_4">
<a href="./pictures/01.gif" class="myButton">GIF</a>
</div>
</div>
</body>

</html>
Binary file added html/resources/pictures/01.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/resources/pictures/01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f1a506c

Please sign in to comment.