Skip to content

Commit

Permalink
Add nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
kretep committed Jun 15, 2023
1 parent 1e9bf59 commit 8429a5d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions nginx/sample-config.conf
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;
}
}

0 comments on commit 8429a5d

Please sign in to comment.