From efe7e61754d8f4889a1c9b9dfc5a6fec8b6330b8 Mon Sep 17 00:00:00 2001 From: Thomas Rogers Date: Tue, 3 Dec 2024 17:27:55 +0100 Subject: [PATCH] Update nginx config to include api/save route --- self-hosting/GUIDE.md | 79 +---------------------------------- self-hosting/nginx/nginx.conf | 5 +++ 2 files changed, 6 insertions(+), 78 deletions(-) diff --git a/self-hosting/GUIDE.md b/self-hosting/GUIDE.md index 398cab8d1..a13b18e07 100644 --- a/self-hosting/GUIDE.md +++ b/self-hosting/GUIDE.md @@ -139,84 +139,7 @@ Nginx is a reverse proxy that receives requests, and directs them to the correct We have included an example Nginx Configuration that redirects traffic from http (80) to https (443), and then directs traffic to the correct service based on the request path. -```nginx -events {} - -http { - sendfile on; - keepalive_timeout 60; - - upstream omnivore_web { - ip_hash; - server 127.0.0.1:3000; - } - - upstream omnivore_backend { - ip_hash; - server 127.0.0.1:4000; - } - - upstream omnivore_imageproxy { - ip_hash; - server 127.0.0.1:7070; - } - - upstream omnivore_bucket { - ip_hash; - server 127.0.0.1:1010; - } - - server { - listen 80; - return 301 https://$host$request_uri; - } - - server { - listen 443 ssl; - server_name omnivore.domain.com; - - - ssl_certificate /path/to/cert.crt; - ssl_certificate_key /path/to/cert.key; - ssl_session_cache builtin:1000 shared:SSL:10m; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; - ssl_prefer_server_ciphers on; - - # Override for authentication on the frontend - location /api/client/auth { - proxy_pass http://omnivore_web; - } - - # API - location /api { - proxy_pass http://omnivore_backend; - } - - # Minio - location /bucket { - proxy_pass http://omnivore_bucket; - } - - # ImageProxy - location /images { - rewrite ^/images/(.*)$ /$1 break; - proxy_pass http://omnivore_imageproxy; - } - - # FrontEnd application - location / { - proxy_pass http://omnivore_web; - } - - # Mail Proxy - location /mail { - proxy_pass http://localhost:4398/mail; - } - } -} - -``` +[Link to nginx.conf here](../self-hosting/nginx/nginx.conf) ## Cloudflare Tunnel Cloudflare tunnels is an easy way to expose a service running on a local machine to the internet without a publicly routable IP Address. diff --git a/self-hosting/nginx/nginx.conf b/self-hosting/nginx/nginx.conf index 607ee9f0c..7cbc813c0 100644 --- a/self-hosting/nginx/nginx.conf +++ b/self-hosting/nginx/nginx.conf @@ -46,6 +46,11 @@ http { proxy_pass http://omnivore_web; } + # Save Route (Frontend) + location /api/save { + proxy_pass http://omnivore_web; + } + # API location /api { proxy_pass http://omnivore_backend;