From 8d0d338ea205b4488ed1ae0c0980bc26098fe5b5 Mon Sep 17 00:00:00 2001 From: Alexander Eifler Date: Wed, 15 Oct 2025 20:56:39 +0200 Subject: [PATCH] feat: add apache reverse proxy documentation --- docs/install/docker.md | 19 +++++++++++---- .../docker/apache-proxy/docker-compose.yml | 24 +++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 docs/install/docker/apache-proxy/docker-compose.yml diff --git a/docs/install/docker.md b/docs/install/docker.md index d77d98a82..3405b36b3 100644 --- a/docs/install/docker.md +++ b/docs/install/docker.md @@ -69,8 +69,6 @@ wget https://raw.githubusercontent.com/vabene1111/recipes/develop/docs/install/d Most deployments will likely use a reverse proxy. -If your reverse proxy is not listed below, please refer to chapter [Others](#others). - #### **Traefik** If you use Traefik, this configuration is the one for you. @@ -115,6 +113,17 @@ wget https://raw.githubusercontent.com/vabene1111/recipes/develop/docs/install/d {% include "./docker/nginx-proxy/docker-compose.yml" %} ~~~ + +#### **Apache proxy** + +If you use Apache as a reverse proxy, this configuration is the one for you. + +~~~yaml +{% include "./docker/apache-proxy/docker-compose.yml" %} +~~~ + +Keep in mind, that the port configured for the service `web_recipes` should be the same as in chapter [Required Headers: Apache](#apache). + ## **DockSTARTer** The main goal of [DockSTARTer](https://dockstarter.com/) is to make it quick and easy to get up and running with Docker. @@ -139,7 +148,8 @@ if you manually change it/bind the folder as a volume. Please be sure to supply all required headers in your nginx/Apache/Caddy/... configuration! -nginx: +#### **nginx** + ```nginx location / { proxy_set_header Host $http_host; # try $host instead if this doesn't work @@ -149,7 +159,8 @@ location / { } ``` -Apache: +#### **Apache** + ```apache RequestHeader set X-Forwarded-Proto "https" Header always set Access-Control-Allow-Origin "*" diff --git a/docs/install/docker/apache-proxy/docker-compose.yml b/docs/install/docker/apache-proxy/docker-compose.yml new file mode 100644 index 000000000..68432cb7b --- /dev/null +++ b/docs/install/docker/apache-proxy/docker-compose.yml @@ -0,0 +1,24 @@ +services: + db_recipes: + restart: always + image: postgres:16-alpine + volumes: + - ./postgresql:/var/lib/postgresql/data + env_file: + - ./.env + + web_recipes: + restart: always + image: vabene1111/recipes + ports: + - 127.0.0.1:8080:80 # replace port + env_file: + - ./.env + volumes: + - staticfiles:/opt/recipes/staticfiles + - ./mediafiles:/opt/recipes/mediafiles + depends_on: + - db_recipes + +volumes: + staticfiles: \ No newline at end of file