From d8f4094d52bb5bfbb31890b80c6ab87f0d2642c8 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Tue, 7 Nov 2023 14:02:04 +0500 Subject: [PATCH 1/6] =?UTF-8?q?1.=20=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=D0=B8=D0=B2=D0=B0?= =?UTF-8?q?=20UseSpa=20=D0=B8=D0=B7=20ConfigureServices=202.=20=D0=A1?= =?UTF-8?q?=D1=87=D0=B8=D1=82=D1=8B=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20ip=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B8=D0=B7=20=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=D0=BA=D0=B0=20"X-Real-IP"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs | 5 +++-- AsbCloudWebApi/Startup.cs | 5 ----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs b/AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs index e8910b5d..392b3bca 100644 --- a/AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs +++ b/AsbCloudWebApi/Middlewares/RequerstTrackerMiddleware.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; -using Org.BouncyCastle.Asn1.Ocsp; +using System.Linq; using System.Threading.Tasks; namespace AsbCloudWebApi.Middlewares @@ -18,10 +18,11 @@ namespace AsbCloudWebApi.Middlewares public async Task InvokeAsync(HttpContext context) { var service = context.RequestServices.GetRequiredService(); + var clientIp = context.Request.Headers["X-Real-IP"].FirstOrDefault(); var requestLog = new AsbCloudApp.Data.RequestLogDto { UserLogin = context.User.Identity?.Name ?? string.Empty, - UserIp = context.Connection?.RemoteIpAddress?.ToString(), + UserIp = clientIp ?? context.Connection?.RemoteIpAddress?.ToString(), RequestMethod = context.Request.Method, RequestPath = context.Request.Path.Value, RequestContentLength = context.Request.ContentLength, diff --git a/AsbCloudWebApi/Startup.cs b/AsbCloudWebApi/Startup.cs index f04a53d1..dd49dfad 100644 --- a/AsbCloudWebApi/Startup.cs +++ b/AsbCloudWebApi/Startup.cs @@ -158,11 +158,6 @@ namespace AsbCloudWebApi endpoints.MapHub("/hubs/telemetry"); endpoints.MapHub("/hubs/reports"); }); - - app.UseSpa(spa => - { - spa.Options.SourcePath = "wwwroot"; - }); } } } From 0ca686434907ab45b5b9a20e956c46eb873f7912 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Tue, 7 Nov 2023 15:16:59 +0500 Subject: [PATCH 2/6] =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=BC=D0=B5=D1=80=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20nginx.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/Docs/Nginx/nginx.conf | 151 +++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 AsbCloudWebApi/Docs/Nginx/nginx.conf diff --git a/AsbCloudWebApi/Docs/Nginx/nginx.conf b/AsbCloudWebApi/Docs/Nginx/nginx.conf new file mode 100644 index 00000000..362ba811 --- /dev/null +++ b/AsbCloudWebApi/Docs/Nginx/nginx.conf @@ -0,0 +1,151 @@ +user www-data; +worker_processes auto; +pid /run/nginx.pid; +include /etc/nginx/modules-enabled/*.conf; + +events { + worker_connections 768; + # multi_accept on; +} + +http { + +proxy_cache_path /home/asb/web-content/cache keys_zone=map-cache:1024m; + +server{ + listen 5085; + charset UTF-8; + + location / { + root /home/asb/public_files; + autoindex on; + autoindex_exact_size off; + autoindex_format html; + autoindex_localtime on; + } +} + +server { + listen 5090; + proxy_buffering on; + proxy_buffer_size 1M; + proxy_buffers 48 1M; + proxy_cache_lock on; + proxy_cache_lock_age 5s; + proxy_http_version 1.1; + proxy_cache_valid 200 61d; + proxy_cache_use_stale error timeout; + + + # ui- + root /home/asb/AsbCloudUI; + index index.html; + + location / { + try_files $uri /index.html; + } + + #, /api /auth /hubs + location ~ ^/(api|auth|hubs)/ { + + #, + proxy_pass http://127.0.0.1:5000; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location /favicon.ico { + alias /home/asb/web-content/images/favicon.ico; + add_header Cache-Control "public"; + expires 4h; + } + + location /config.json { + alias /home/asb/web-content/config.json; + add_header Cache-Control "public"; + expires 4h; + } + + location /images/ { + root /home/asb/web-content; + add_header Cache-Control "public"; + expires 4h; + } + + location /map/a/ { + proxy_pass https://a.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/b/ { + proxy_pass https://b.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/c/ { + proxy_pass https://c.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/ { + proxy_pass https://b.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } +} + + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + # server_tokens off; + + # server_names_hash_bucket_size 64; + # server_name_in_redirect off; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + ## + # SSL Settings + ## + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE + ssl_prefer_server_ciphers on; + + ## + # Logging Settings + ## + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + ## + # Gzip Settings + ## + + gzip on; + + # gzip_vary on; + # gzip_proxied any; + # gzip_comp_level 6; + # gzip_buffers 16 8k; + # gzip_http_version 1.1; + # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + + ## + # Virtual Host Configs + ## + + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; +} From 9ba97ddcb5ce495505dde925b8104fa184c63101 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Tue, 7 Nov 2023 15:19:02 +0500 Subject: [PATCH 3/6] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/Docs/Nginx/{nginx.conf => nginx.conf.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename AsbCloudWebApi/Docs/Nginx/{nginx.conf => nginx.conf.md} (100%) diff --git a/AsbCloudWebApi/Docs/Nginx/nginx.conf b/AsbCloudWebApi/Docs/Nginx/nginx.conf.md similarity index 100% rename from AsbCloudWebApi/Docs/Nginx/nginx.conf rename to AsbCloudWebApi/Docs/Nginx/nginx.conf.md From 4927f290569d050725489ab6492a0e409093c2fc Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Tue, 7 Nov 2023 15:20:03 +0500 Subject: [PATCH 4/6] =?UTF-8?q?=D0=9A=D0=BE=D0=B4=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/Docs/Nginx/nginx.conf | 151 +++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 AsbCloudWebApi/Docs/Nginx/nginx.conf diff --git a/AsbCloudWebApi/Docs/Nginx/nginx.conf b/AsbCloudWebApi/Docs/Nginx/nginx.conf new file mode 100644 index 00000000..3d9675bd --- /dev/null +++ b/AsbCloudWebApi/Docs/Nginx/nginx.conf @@ -0,0 +1,151 @@ +user www-data; +worker_processes auto; +pid /run/nginx.pid; +include /etc/nginx/modules-enabled/*.conf; + +events { + worker_connections 768; + # multi_accept on; +} + +http { + +proxy_cache_path /home/asb/web-content/cache keys_zone=map-cache:1024m; + +server{ + listen 5085; + charset UTF-8; + + location / { + root /home/asb/public_files; + autoindex on; + autoindex_exact_size off; + autoindex_format html; + autoindex_localtime on; + } +} + +server { + listen 5090; + proxy_buffering on; + proxy_buffer_size 1M; + proxy_buffers 48 1M; + proxy_cache_lock on; + proxy_cache_lock_age 5s; + proxy_http_version 1.1; + proxy_cache_valid 200 61d; + proxy_cache_use_stale error timeout; + + + #путь до папки с ui-проектом в файловой системе + root /home/asb/AsbCloudUI; + index index.html; + + location / { + try_files $uri /index.html; + } + + #запрос, начинающийся с /api или /auth или /hubs + location ~ ^/(api|auth|hubs)/ { + + #адрес, на который будут пересылаться запросы от клиентов + proxy_pass http://127.0.0.1:5000; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location /favicon.ico { + alias /home/asb/web-content/images/favicon.ico; + add_header Cache-Control "public"; + expires 4h; + } + + location /config.json { + alias /home/asb/web-content/config.json; + add_header Cache-Control "public"; + expires 4h; + } + + location /images/ { + root /home/asb/web-content; + add_header Cache-Control "public"; + expires 4h; + } + + location /map/a/ { + proxy_pass https://a.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/b/ { + proxy_pass https://b.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/c/ { + proxy_pass https://c.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/ { + proxy_pass https://b.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } +} + + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + # server_tokens off; + + # server_names_hash_bucket_size 64; + # server_name_in_redirect off; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + ## + # SSL Settings + ## + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE + ssl_prefer_server_ciphers on; + + ## + # Logging Settings + ## + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + ## + # Gzip Settings + ## + + gzip on; + + # gzip_vary on; + # gzip_proxied any; + # gzip_comp_level 6; + # gzip_buffers 16 8k; + # gzip_http_version 1.1; + # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + + ## + # Virtual Host Configs + ## + + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; +} From 5de2f28553dbfa79c3ea3d82de1ceb3443422faf Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Tue, 7 Nov 2023 15:24:56 +0500 Subject: [PATCH 5/6] =?UTF-8?q?=D0=A2=D0=B0=D0=B1=D1=83=D0=BB=D1=8F=D1=86?= =?UTF-8?q?=D0=B8=D1=8F,=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/Docs/Nginx/nginx.conf | 148 +++++++++++------------ AsbCloudWebApi/Docs/Nginx/nginx.conf.md | 151 ------------------------ 2 files changed, 74 insertions(+), 225 deletions(-) delete mode 100644 AsbCloudWebApi/Docs/Nginx/nginx.conf.md diff --git a/AsbCloudWebApi/Docs/Nginx/nginx.conf b/AsbCloudWebApi/Docs/Nginx/nginx.conf index 3d9675bd..1700cae3 100644 --- a/AsbCloudWebApi/Docs/Nginx/nginx.conf +++ b/AsbCloudWebApi/Docs/Nginx/nginx.conf @@ -10,93 +10,93 @@ events { http { -proxy_cache_path /home/asb/web-content/cache keys_zone=map-cache:1024m; + proxy_cache_path /home/asb/web-content/cache keys_zone=map-cache:1024m; -server{ - listen 5085; - charset UTF-8; + server{ + listen 5085; + charset UTF-8; - location / { - root /home/asb/public_files; - autoindex on; - autoindex_exact_size off; - autoindex_format html; - autoindex_localtime on; - } -} + location / { + root /home/asb/public_files; + autoindex on; + autoindex_exact_size off; + autoindex_format html; + autoindex_localtime on; + } + } -server { - listen 5090; - proxy_buffering on; - proxy_buffer_size 1M; - proxy_buffers 48 1M; - proxy_cache_lock on; - proxy_cache_lock_age 5s; - proxy_http_version 1.1; - proxy_cache_valid 200 61d; - proxy_cache_use_stale error timeout; + server { + listen 5090; + proxy_buffering on; + proxy_buffer_size 1M; + proxy_buffers 48 1M; + proxy_cache_lock on; + proxy_cache_lock_age 5s; + proxy_http_version 1.1; + proxy_cache_valid 200 61d; + proxy_cache_use_stale error timeout; - #путь до папки с ui-проектом в файловой системе - root /home/asb/AsbCloudUI; - index index.html; + #путь до папки с ui-проектом в файловой системе + root /home/asb/AsbCloudUI; + index index.html; - location / { - try_files $uri /index.html; - } + location / { + try_files $uri /index.html; + } - #запрос, начинающийся с /api или /auth или /hubs - location ~ ^/(api|auth|hubs)/ { + #запрос, начинающийся с /api или /auth или /hubs + location ~ ^/(api|auth|hubs)/ { - #адрес, на который будут пересылаться запросы от клиентов - proxy_pass http://127.0.0.1:5000; + #адрес, на который будут пересылаться запросы от клиентов + proxy_pass http://127.0.0.1:5000; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - 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 Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } - location /favicon.ico { - alias /home/asb/web-content/images/favicon.ico; - add_header Cache-Control "public"; - expires 4h; - } + location /favicon.ico { + alias /home/asb/web-content/images/favicon.ico; + add_header Cache-Control "public"; + expires 4h; + } - location /config.json { - alias /home/asb/web-content/config.json; - add_header Cache-Control "public"; - expires 4h; - } + location /config.json { + alias /home/asb/web-content/config.json; + add_header Cache-Control "public"; + expires 4h; + } - location /images/ { - root /home/asb/web-content; - add_header Cache-Control "public"; - expires 4h; - } + location /images/ { + root /home/asb/web-content; + add_header Cache-Control "public"; + expires 4h; + } - location /map/a/ { - proxy_pass https://a.tile.openstreetmap.org/; - proxy_cache map-cache; - proxy_cache_key $request_uri; - } - location /map/b/ { - proxy_pass https://b.tile.openstreetmap.org/; - proxy_cache map-cache; - proxy_cache_key $request_uri; - } - location /map/c/ { - proxy_pass https://c.tile.openstreetmap.org/; - proxy_cache map-cache; - proxy_cache_key $request_uri; - } - location /map/ { - proxy_pass https://b.tile.openstreetmap.org/; - proxy_cache map-cache; - proxy_cache_key $request_uri; - } -} + location /map/a/ { + proxy_pass https://a.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/b/ { + proxy_pass https://b.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/c/ { + proxy_pass https://c.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + location /map/ { + proxy_pass https://b.tile.openstreetmap.org/; + proxy_cache map-cache; + proxy_cache_key $request_uri; + } + } ## # Basic Settings diff --git a/AsbCloudWebApi/Docs/Nginx/nginx.conf.md b/AsbCloudWebApi/Docs/Nginx/nginx.conf.md deleted file mode 100644 index 362ba811..00000000 --- a/AsbCloudWebApi/Docs/Nginx/nginx.conf.md +++ /dev/null @@ -1,151 +0,0 @@ -user www-data; -worker_processes auto; -pid /run/nginx.pid; -include /etc/nginx/modules-enabled/*.conf; - -events { - worker_connections 768; - # multi_accept on; -} - -http { - -proxy_cache_path /home/asb/web-content/cache keys_zone=map-cache:1024m; - -server{ - listen 5085; - charset UTF-8; - - location / { - root /home/asb/public_files; - autoindex on; - autoindex_exact_size off; - autoindex_format html; - autoindex_localtime on; - } -} - -server { - listen 5090; - proxy_buffering on; - proxy_buffer_size 1M; - proxy_buffers 48 1M; - proxy_cache_lock on; - proxy_cache_lock_age 5s; - proxy_http_version 1.1; - proxy_cache_valid 200 61d; - proxy_cache_use_stale error timeout; - - - # ui- - root /home/asb/AsbCloudUI; - index index.html; - - location / { - try_files $uri /index.html; - } - - #, /api /auth /hubs - location ~ ^/(api|auth|hubs)/ { - - #, - proxy_pass http://127.0.0.1:5000; - - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - } - - location /favicon.ico { - alias /home/asb/web-content/images/favicon.ico; - add_header Cache-Control "public"; - expires 4h; - } - - location /config.json { - alias /home/asb/web-content/config.json; - add_header Cache-Control "public"; - expires 4h; - } - - location /images/ { - root /home/asb/web-content; - add_header Cache-Control "public"; - expires 4h; - } - - location /map/a/ { - proxy_pass https://a.tile.openstreetmap.org/; - proxy_cache map-cache; - proxy_cache_key $request_uri; - } - location /map/b/ { - proxy_pass https://b.tile.openstreetmap.org/; - proxy_cache map-cache; - proxy_cache_key $request_uri; - } - location /map/c/ { - proxy_pass https://c.tile.openstreetmap.org/; - proxy_cache map-cache; - proxy_cache_key $request_uri; - } - location /map/ { - proxy_pass https://b.tile.openstreetmap.org/; - proxy_cache map-cache; - proxy_cache_key $request_uri; - } -} - - ## - # Basic Settings - ## - - sendfile on; - tcp_nopush on; - tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - # server_tokens off; - - # server_names_hash_bucket_size 64; - # server_name_in_redirect off; - - include /etc/nginx/mime.types; - default_type application/octet-stream; - - ## - # SSL Settings - ## - - ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE - ssl_prefer_server_ciphers on; - - ## - # Logging Settings - ## - - access_log /var/log/nginx/access.log; - error_log /var/log/nginx/error.log; - - ## - # Gzip Settings - ## - - gzip on; - - # gzip_vary on; - # gzip_proxied any; - # gzip_comp_level 6; - # gzip_buffers 16 8k; - # gzip_http_version 1.1; - # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; - - ## - # Virtual Host Configs - ## - - include /etc/nginx/conf.d/*.conf; - include /etc/nginx/sites-enabled/*; -} From 3fc2184f4c6d123c877920a99997603cca7b3ed3 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Fri, 10 Nov 2023 10:05:01 +0500 Subject: [PATCH 6/6] =?UTF-8?q?location=20=D0=B4=D0=BB=D1=8F=20swagger=20?= =?UTF-8?q?=D0=B2=20nginx.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudWebApi/Docs/Nginx/nginx.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/AsbCloudWebApi/Docs/Nginx/nginx.conf b/AsbCloudWebApi/Docs/Nginx/nginx.conf index 1700cae3..f33640db 100644 --- a/AsbCloudWebApi/Docs/Nginx/nginx.conf +++ b/AsbCloudWebApi/Docs/Nginx/nginx.conf @@ -58,6 +58,16 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } + location /swagger/ { + proxy_pass http://127.0.0.1:5000/swagger/; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + location /favicon.ico { alias /home/asb/web-content/images/favicon.ico; add_header Cache-Control "public";