-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: nginx config for gateway service (#1275)
- Loading branch information
1 parent
fe7af63
commit 0b02e81
Showing
2 changed files
with
26 additions
and
32 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
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 |
---|---|---|
@@ -1,41 +1,35 @@ | ||
events { | ||
worker_connections 1024; | ||
upstream ui { | ||
server ui:80; | ||
} | ||
|
||
http { | ||
upstream ui { | ||
server ui:80; | ||
} | ||
|
||
upstream uibackend { | ||
server uibackend:8890; | ||
} | ||
upstream uibackend { | ||
server uibackend:8890; | ||
} | ||
|
||
upstream apiserver { | ||
server apiserver:8888; | ||
} | ||
upstream apiserver { | ||
server apiserver:8888; | ||
} | ||
|
||
server { | ||
listen 80; | ||
absolute_redirect off; | ||
server { | ||
listen 80; | ||
absolute_redirect off; | ||
|
||
location / { | ||
proxy_pass http://ui/; | ||
} | ||
location / { | ||
proxy_pass http://ui/; | ||
} | ||
|
||
location /ui/api/ { | ||
proxy_pass http://uibackend/; | ||
} | ||
location /ui/api/ { | ||
proxy_pass http://uibackend/; | ||
} | ||
|
||
location /api/ { | ||
proxy_set_header X-Forwarded-Host $http_host; | ||
proxy_set_header X-Forwarded-Prefix /api; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://apiserver/; | ||
} | ||
location /api/ { | ||
proxy_set_header X-Forwarded-Host $http_host; | ||
proxy_set_header X-Forwarded-Prefix /api; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://apiserver/; | ||
} | ||
|
||
location /apidocs/ { | ||
proxy_pass http://swagger-ui:8080/; | ||
} | ||
location /apidocs/ { | ||
proxy_pass http://swagger-ui:8080/; | ||
} | ||
} |