-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 changed file
with
27 additions
and
0 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,27 @@ | ||
server { | ||
listen 4242; | ||
server_name _; # Match any hostname (using underscore) | ||
|
||
root /var/www/workflomics.org; | ||
|
||
# Serve static files for the root path and existing files | ||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
# Proxy requests to the /api endpoint | ||
location /api { | ||
rewrite ^/api(.*) $1 break; | ||
proxy_pass http://localhost:3000; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
} | ||
|
||
# Proxy requests to the /ape endpoint | ||
location /ape { | ||
rewrite ^/ape(.*) $1 break; | ||
proxy_pass http://localhost:8080; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
} | ||
} |