forked from mathialm/secfit
-
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.
- Loading branch information
Showing
2 changed files
with
42 additions
and
36 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,31 +1,49 @@ | ||
| server { | ||
| user nginx; | ||
| worker_processes 1; | ||
| error_log /var/log/nginx/error.log warn; | ||
| pid /var/run/nginx.pid; | ||
|
|
||
|
|
||
| events { | ||
| worker_connections 1024; | ||
| } | ||
|
|
||
| http { | ||
| server { | ||
| listen 80; | ||
|
|
||
| # Route to frontend | ||
| location / { | ||
| proxy_pass http://0.0.0.0:23/; | ||
| proxy_set_header Host ; | ||
| proxy_set_header X-Real-IP ; | ||
| proxy_set_header X-Forwarded-For ; | ||
| proxy_pass http://frontend:3000; | ||
| proxy_set_header Host $http_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; | ||
| } | ||
| } | ||
|
|
||
| server { | ||
| listen 217; | ||
| location / { | ||
| proxy_pass http://0.0.0.0:/; | ||
| proxy_set_header Host ; | ||
| proxy_set_header X-Real-IP ; | ||
| proxy_set_header X-Forwarded-For ; | ||
| # Route to backend | ||
| location /api/ { | ||
| proxy_pass http://backend:8000; | ||
| proxy_set_header Host $http_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 /admin/ { | ||
| proxy_pass http://backend:8000; | ||
| proxy_set_header Host $http_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; | ||
| } | ||
|
|
||
| server { | ||
| listen 227; | ||
| location / { | ||
| proxy_pass http://0.0.0.0:22/; | ||
| proxy_set_header Host ; | ||
| proxy_set_header X-Real-IP ; | ||
| proxy_set_header X-Forwarded-For ; | ||
| location /static/admin/ { | ||
| proxy_pass http://backend:8000; | ||
| proxy_set_header Host $http_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; | ||
| } | ||
| } | ||
| } | ||
| } |