fix: Исправлена конфигурация nginx для named locations
- Убрана URI-часть из proxy_pass в named locations - Заменен https на http для upstream (локальный 127.0.0.1) - Исправлена ошибка nginx -t
This commit is contained in:
@@ -76,7 +76,7 @@ server {
|
||||
location /api/ {
|
||||
limit_req zone=api_limit burst=20 nodelay;
|
||||
|
||||
proxy_pass https://backend_api;
|
||||
proxy_pass http://backend_api;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
@@ -97,7 +97,7 @@ server {
|
||||
location /api/auth/login {
|
||||
limit_req zone=login_limit burst=5 nodelay;
|
||||
|
||||
proxy_pass https://backend_api;
|
||||
proxy_pass http://backend_api;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -111,7 +111,7 @@ server {
|
||||
location /api/auth/register {
|
||||
limit_req zone=login_limit burst=3 nodelay;
|
||||
|
||||
proxy_pass https://backend_api;
|
||||
proxy_pass http://backend_api;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -124,7 +124,7 @@ server {
|
||||
|
||||
# WebSocket support for real-time features
|
||||
location /ws {
|
||||
proxy_pass https://backend_api;
|
||||
proxy_pass http://backend_api;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
@@ -180,7 +180,7 @@ server {
|
||||
|
||||
# Fallback to backend for robots.txt
|
||||
location @backend_robots {
|
||||
proxy_pass https://backend_api/robots.txt;
|
||||
proxy_pass http://backend_api;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -190,7 +190,7 @@ server {
|
||||
|
||||
# Fallback to backend for sitemap
|
||||
location @backend_sitemap {
|
||||
proxy_pass https://backend_api/sitemap.xml;
|
||||
proxy_pass http://backend_api;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -277,7 +277,7 @@ server {
|
||||
|
||||
# Proxy to backend
|
||||
location / {
|
||||
proxy_pass https://backend_api;
|
||||
proxy_pass http://backend_api;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
|
||||
Reference in New Issue
Block a user