Browse Source

Update 4 files

- /examples/dbmanager.rwsbank.com.ua.nginx-example
- /examples/api.rwsbank.com.ua.nginx-example
- /examples/tasks.rwsbank.com.ua.nginx-example
- /examples/fs-tasks.rwsbank.com.ua.nginx-example
merge-requests/246/head
Coder 2 years ago
parent
commit
a76dad6aec
  1. 91
      examples/api.rwsbank.com.ua.nginx-example
  2. 27
      examples/dbmanager.rwsbank.com.ua.nginx-example
  3. 34
      examples/fs-tasks.rwsbank.com.ua.nginx-example
  4. 57
      examples/tasks.rwsbank.com.ua.nginx-example

91
examples/api.rwsbank.com.ua.nginx-example

@ -0,0 +1,91 @@ @@ -0,0 +1,91 @@
server {
server_name tasks-api.rwsbank.com.ua www.tasks-api.rwsbank.com.ua;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
gzip on;
gzip_types text/plain application/xml text/css application/javascript;
gzip_min_length 1000;
location / {
client_max_body_size 100M;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
listen 443 ssl;
ssl_certificate /etc/ssl/rwsbank/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/rwsbank/com.key;
}
server {
if ($host = tasks-api.rwsbank.com.ua) {
return 301 https://$host$request_uri;
}
server_name tasks-api.rwsbank.com.ua www.tasks-api.rwsbank.com.ua;
listen 80;
return 404; # managed by Certbot
}
server {
listen 443 ssl;
ssl_certificate /etc/ssl/rwsbank/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/rwsbank/com.key;
root /home/programmer/api-rws/documentation;
index index.html index.htm index.nginx-debian.html;
server_name opendoc.rwsbank.com.ua;
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to redirecting to index.html
try_files $uri $uri/ /index.html;
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
# Javascript and CSS files
location ~* \.(?:css|js)$ {
try_files $uri =404;
expires 1y;
access_log off;
add_header Cache-Control "public";
}
# Any route containing a file extension (e.g. /devicesfile.js)
location ~ ^.+\..+$ {
try_files $uri =404;
}
}

27
examples/dbmanager.rwsbank.com.ua.nginx-example

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
server {
server_name tasks-db-manager.rwsbank.com.ua;
location / {
proxy_http_version 1.1;
proxy_pass http://localhost:4000;
}
listen 443 ssl;
ssl_certificate /etc/ssl/rwsbank/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/rwsbank/com.key;
}
server {
if ($host = tasks-db-manager.rwsbank.com.ua) {
return 301 https://$host$request_uri;
}
listen 80;
server_name tasks-db-manager.rwsbank.com.ua;
return 404;
}

34
examples/fs-tasks.rwsbank.com.ua.nginx-example

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
server {
server_name tasks-fs.rwsbank.com.ua;
location / {
proxy_pass "http://127.0.0.1:9000";
}
location =/taskme {
deny all;
}
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/ssl/rwsbank/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/rwsbank/com.key;
}
server {
if ($host = tasks-fs.rwsbank.com.ua) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name tasks-fs.rwsbank.com.ua;
return 404;
}

57
examples/tasks.rwsbank.com.ua.nginx-example

@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
server {
root /home/programmer/web-app/build;
index index.html index.htm index.nginx-debian.html;
server_name tasks.rwsbank.com.ua tasks-web-app.rwsbank.com.ua;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to redirecting to index.html
try_files $uri $uri/ /index.html;
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
access_log off;
add_header Cache-Control "public";
}
# Javascript and CSS files
location ~* \.(?:css|js)$ {
try_files $uri =404;
access_log off;
add_header Cache-Control "public";
}
# Any route containing a file extension (e.g. /devicesfile.js)
location ~ ^.+\..+$ {
try_files $uri =404;
}
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate /etc/ssl/rwsbank/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/rwsbank/com.key;
}
server {
if ($host = tasks-web-app.rwsbank.com.ua) {
return 301 https://$host$request_uri;
}
if ($host = tasks.rwsbank.com.ua) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name tasks-web-app.rwsbank.com.ua;
return 404;
}
Loading…
Cancel
Save