-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ashurov-dev' into result-dev
- Loading branch information
Showing
7 changed files
with
118 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
upstream facade_app { | ||
server 127.0.0.1:8080; | ||
} | ||
|
||
upstream grafana { | ||
server 127.0.0.1:3000; | ||
} | ||
|
||
server { | ||
server_name cassette-world.ru www.cassette-world.ru; | ||
client_max_body_size 10M; | ||
|
||
location /static/ { | ||
proxy_pass https://cassette.hb.ru-msk.vkcloud-storage.ru/static/; | ||
|
||
proxy_set_header Host cassette.hb.ru-msk.vkcloud-storage.ru; | ||
proxy_redirect off; | ||
add_header Cache-Control "public, max-age=31536000"; | ||
autoindex on; | ||
} | ||
|
||
location /images/ { | ||
alias /home/ubuntu/images/; | ||
add_header Cache-Control "public, max-age=31536000"; | ||
autoindex on; | ||
} | ||
|
||
location /assets/ { | ||
alias /home/ubuntu/frontend/2024_2_GOATS/public/assets/; | ||
add_header Cache-Control "public, max-age=31536000"; | ||
autoindex on; | ||
} | ||
|
||
location = /api/room/join { | ||
proxy_pass http://facade_app; # Ваш WebSocket-сервер | ||
proxy_http_version 1.1; # WebSocket требует HTTP/1.1 | ||
proxy_set_header Upgrade $http_upgrade; # WebSocket-заголовки | ||
proxy_set_header Connection "Upgrade"; # WebSocket-заголовки | ||
proxy_set_header Host $host; # Проброс оригинального Host | ||
proxy_cache_bypass $http_upgrade; # Отключение кеша для WebSocket | ||
} | ||
|
||
|
||
location ~ ^/api/ { | ||
proxy_pass http://facade_app; | ||
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; | ||
} | ||
|
||
location /grafana { | ||
proxy_pass http://grafana; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-Host $host; | ||
proxy_set_header X-Forwarded-Server $host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
} | ||
|
||
location / { | ||
root /home/ubuntu/frontend/2024_2_GOATS/dist; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
listen 443 ssl http2; # managed by Certbot | ||
ssl_certificate /etc/letsencrypt/live/cassette-world.ru/fullchain.pem; # managed by Certbot | ||
ssl_certificate_key /etc/letsencrypt/live/cassette-world.ru/privkey.pem; # managed by Certbot | ||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | ||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | ||
|
||
|
||
} | ||
|
||
|
||
server { | ||
if ($host = www.cassette-world.ru) { | ||
return 301 https://$host$request_uri; | ||
} # managed by Certbot | ||
|
||
|
||
if ($host = cassette-world.ru) { | ||
return 301 https://$host$request_uri; | ||
} # managed by Certbot | ||
|
||
|
||
listen 80; | ||
server_name cassette-world.ru www.cassette-world.ru; | ||
return 404; # managed by Certbot | ||
|
||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters