aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Soniya Prasad <soniyagupta82270@gmail.com> 2024-03-31 00:05:00 +0530
committerGravatar GitHub <noreply@github.com> 2024-03-30 19:35:00 +0100
commit9d48121e052183bbb93aca7dead4cb5cf0629428 (patch)
treec62241aa137917972005ebaeecd8ea19ee49802c
parent7da0e70a7221a42fb8ff6534fc339b18f8e2daa1 (diff)
Update documentation for Caddy reverse proxy with subfolder (#6219)
* Create 06_Reverse_Proxy_Setup.md Update documentation for Caddy reverse proxy with subfolder * Create 06_Reverse_Proxy_Setup.md in docs/en/developers/03_Backend * fixed markdown syntax * markdown syntax fix * Update docs/en/developers/03_Backend/06_Reverse_Proxy_Setup.md Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * implemented suggested changes * Add link and re-organise --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
-rw-r--r--docs/en/admins/01_Index.md1
-rw-r--r--docs/en/admins/Caddy.md84
2 files changed, 85 insertions, 0 deletions
diff --git a/docs/en/admins/01_Index.md b/docs/en/admins/01_Index.md
index a7aa01140..b0135546e 100644
--- a/docs/en/admins/01_Index.md
+++ b/docs/en/admins/01_Index.md
@@ -25,4 +25,5 @@ Learn how to install, update, and backup FreshRSS, as well as how to use the com
* [Database configuration](DatabaseConfig.md)
* [Using the command line interface (CLI)](https://github.com/FreshRSS/FreshRSS/tree/edge/cli)
* [Configuring the email address validation](05_Configuring_email_validation.md)
+* [Reverse proxy with Caddy](Caddy.md)
* [Frequently asked questions](04_Frequently_Asked_Questions.md)
diff --git a/docs/en/admins/Caddy.md b/docs/en/admins/Caddy.md
new file mode 100644
index 000000000..f3c2be96b
--- /dev/null
+++ b/docs/en/admins/Caddy.md
@@ -0,0 +1,84 @@
+## Using Caddy as a Reverse Proxy
+
+## Using Caddy as a Reverse Proxy with a Subfolder
+
+To set up FreshRSS behind a reverse proxy with Caddy and using a subfolder, follow these steps:
+
+1. **Configure Caddyfile:**
+
+ Update your Caddyfile with the following configuration:
+
+ ```plaintext
+ example.com {
+ redir /freshrss /freshrss/i/
+ route /freshrss* {
+ uri strip_prefix /freshrss
+ reverse_proxy freshrss:80 {
+ header_up Host {host}
+ header_up X-Real-IP {remote}
+ header_up X-Forwarded-Proto {scheme}
+ header_up X-Forwarded-Host {host}
+ header_up X-Forwarded-For {remote}
+ header_up X-Forwarded-Ssl {on}
+ header_up X-Forwarded-Prefix "/freshrss/"
+ }
+ }
+ }
+ ```
+
+ Replace `example.com` with your actual domain and `freshrss` with the subfolder where FreshRSS is hosted.
+
+2. **Update FreshRSS Configuration:**
+
+ Open the `config.php` file in your FreshRSS installation and update the `base_url` parameter to match the subfolder configuration:
+
+ ```php
+ 'base_url' => 'https://example.com/freshrss',
+ ```
+
+ Replace `example.com` with your actual domain and `freshrss` with the subfolder name specified in the Caddyfile.
+
+3. **Restart Caddy and FreshRSS:**
+
+ Restart Caddy to apply the configuration changes:
+
+ ```bash
+ systemctl restart caddy
+ ```
+
+ Restart FreshRSS to ensure that it recognizes the new base URL:
+
+ ```bash
+ docker-compose restart freshrss
+ ```
+
+4. **Access FreshRSS:**
+
+ FreshRSS should now be accessible at `https://example.com/freshrss`.
+
+### Example Caddyfile Entry
+
+```plaintext
+example.com {
+ redir /freshrss /freshrss/i/
+ route /freshrss* {
+ uri strip_prefix /freshrss
+ reverse_proxy freshrss:80 {
+ header_up Host {host}
+ header_up X-Real-IP {remote}
+ header_up X-Forwarded-Proto {scheme}
+ header_up X-Forwarded-Host {host}
+ header_up X-Forwarded-For {remote}
+ header_up X-Forwarded-Ssl {on}
+ header_up X-Forwarded-Prefix "/freshrss/"
+ }
+ }
+}
+```
+
+Replace `example.com` with your actual domain and `freshrss` with the subfolder name where FreshRSS is hosted.
+
+### Note
+
+
+Ensure that the Docker container name for FreshRSS (freshrss in this example) matches the name used in the Caddyfile configuration. By following these steps, you should be able to successfully configure Caddy as a reverse proxy with a subfolder for FreshRSS. Remember to update the base_url parameter in the FreshRSS configuration to match the subfolder configuration set in Caddy.