Hi there,
I have a webserver A running apache and exposed to the external world (ports 80/443) and a server B (IP 192.168.1.2) running onlyoffice and traefik both as docker. I have a domain name for onlyoffice that points to A and I would like to proxy that request to server B, where Onlyoffice runs under traefik. Everything’s ok using unencrypted connection to port 80. Problems arise with SSL, as I get 404 error.
Here is my apache configuration file:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin mymail@myprovider.com
ServerName domain.ddns.net
ServerAlias www.domain.ddns.net
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule ssl_module modules/mod_ssl.so
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/domain.ddns.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.ddns.net/privkey.pem
## Strong SSL Security
## https://raymii.org/s/tutorials/Strong_SSL_Security_On_Apache2.html
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256$
SSLProtocol All -SSLv2 -SSLv3
SSLCompression off
SSLHonorCipherOrder on
SetEnvIf Host "^(.*)$" THE_HOST=$1
RequestHeader setifempty X-Forwarded-Proto https
RequestHeader setifempty X-Forwarded-Host %{THE_HOST}e
ProxyAddHeaders Off
ProxyPass / "http://192.168.1.2/"
ProxyPassReverse / "http://192.168.1.2/"
LogLevel error proxy:trace5
# LogLevel error
ErrorLog /mypath/onlyoffice_apache_error.log
CustomLog /mypath/onlyoffice_apache_access.log combined
</VirtualHost>
</IfModule>
Here is my onlyoffice docker-compose file:
version: '3.7'
services:
onlyoffice-documentserver:
container_name: onlyoffice
image: onlyoffice/documentserver:latest
networks:
- traefik
stdin_open: true
tty: true
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.onlyoffice.rule=Host(`domain.ddns.net`)"
- "traefik.http.routers.onlyoffice.entrypoints=web"
- "traefik.http.routers.onlyoffice.middlewares=onlyoffice-headers"
- "traefik.http.services.onlyoffice.loadbalancer.server.port=80"
## Middleware definition
# Headers for onlyoffice, https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/151
- "traefik.http.middlewares.onlyoffice-headers.headers.customrequestheaders.X-Forwarded-Proto=http"
- "traefik.http.middlewares.onlyoffice-headers.headers.accesscontrolalloworiginlist=*"
volumes:
- /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data
- /app/onlyoffice/DocumentServer/log:/var/log/onlyoffice
- /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice
- /app/onlyoffice/DocumentServer/db:/var/lib/postgresql
networks:
traefik:
external: true
Thank you in advance to whom may help.