Skip to content
Snippets Groups Projects
Verified Commit 372ffaa8 authored by David Beniamine's avatar David Beniamine
Browse files

Fix nginx conf for onlyoffice + update Readme

parent 3bfc475f
Branches tl
No related tags found
No related merge requests found
# Nextcloud # Nextcloud
Ce dépôt contient le docker-compose pour nextcloud + onlyoffice avec front-end nginx, base de donnée et cron séparés. This repository provides a quick way to laucndh nextcloud + only office (optionnal) behind nginx (optionnal) and with an ldap connection (optionnal).
## Installation
The default docker-compose does not expose any ports.
There are three optionnals compose file that can be activated vi `COMPOSE_FILE` variable in `.env` :
+ `traefik.yml` : a config file to use behind traefik, this file assumes that you have a traefik configured as [here](https://gitlab.tetras-libre.fr/nocloud/docker/traefik) and a docker network called `traefik` to join it
+ `ldap.yml` : setup connection to to a `ldap` service via a `ldap` network, you have to install this service by yourself
+ `onlyoffice.yml` add an onlyoffice server to your nextcloud, **warning** you also have to uncomment a few lines in `nginx.conf`
```
cp .env.sample .env
cp nginx.conf.sample nginx.conf
# Edit both files to suit your needs
# You have to uncomment a block in nginx.conf if you want to use onlyoffice
docker-compose up -d
# Got to nextcloud url to finish the setup
```
## Description du docker-compose ## Description du docker-compose
Docker-compose from https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud and https://hub.docker.com/_/nextcloud Docker-compose from https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud and https://hub.docker.com/_/nextcloud
* Nextcloud installé via le tag 22-fpm (mise à jour manuelle pour changement de version majeure) * Nextcloud installed via tag 22-fpm (major upgrade is manual)
* Mariadb installé via le tag `latest` * Mariadb installed using tag `latest`
* Nginx installé via le tag `latest` * Nginx installed using tag `latest`
* Aucun port n'ext exposé vers l'extérieur (utilisation de Traefik) * No port exposed to external network
* Données Nextcloud accessible à * Nextcloud data are visible to
* cron * cron
* nextcloud * nextcloud
* nginx * nginx
...@@ -87,25 +87,26 @@ http { ...@@ -87,25 +87,26 @@ http {
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
} }
location ~* ^/ds-vpath/ { # Uncomment the block below to use onlyoffice
rewrite /ds-vpath/(.*) /$1 break; #location ~* ^/ds-vpath/ {
proxy_pass http://onlyoffice-document-server; # rewrite /ds-vpath/(.*) /$1 break;
proxy_redirect off; # proxy_pass http://onlyoffice-document-server;
# proxy_redirect off;
client_max_body_size 100m;
# client_max_body_size 100m;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # proxy_http_version 1.1;
# Disabled, if enable we get "Unknown error on OnlyOffice # proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade"; # # Disabled, if enable we get "Unknown error on OnlyOffice
# # proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr; # proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $the_host/ds-vpath; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Manually set to https to avoid "Unknown error" on OnlyOffice # proxy_set_header X-Forwarded-Host $the_host/ds-vpath;
proxy_set_header X-Forwarded-Proto "https"; # # Manually set to https to avoid "Unknown error" on OnlyOffice
} # proxy_set_header X-Forwarded-Proto "https";
#}
location ~ \.php(?:$|/) { location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment