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
Mauritz Hardersen Skogøy
committed
Mar 4, 2025
1 parent
c875001
commit 74f00bb
Showing
2 changed files
with
53 additions
and
40 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,31 @@ | ||
| server { | ||
| listen 80; | ||
|
|
||
| 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 ; | ||
| } | ||
| } | ||
|
|
||
| server { | ||
| listen 217; | ||
| location / { | ||
| proxy_pass http://0.0.0.0:21/; | ||
| proxy_set_header Host ; | ||
| proxy_set_header X-Real-IP ; | ||
| proxy_set_header X-Forwarded-For ; | ||
| } | ||
| } | ||
|
|
||
|
|
||
| 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 ; | ||
| } | ||
| } |
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,49 +1,31 @@ | ||
| user nginx; | ||
| worker_processes 1; | ||
| error_log /var/log/nginx/error.log warn; | ||
| pid /var/run/nginx.pid; | ||
|
|
||
|
|
||
| events { | ||
| worker_connections 1024; | ||
| } | ||
|
|
||
| http { | ||
| server { | ||
| server { | ||
| listen 80; | ||
|
|
||
| # Route to frontend | ||
| location / { | ||
| 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; | ||
| proxy_pass http://0.0.0.0:23/; | ||
| 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; | ||
| 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 ; | ||
| } | ||
| } | ||
|
|
||
| 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; | ||
| } | ||
|
|
||
| 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; | ||
| 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 ; | ||
| } | ||
| } | ||
| } | ||
| } |