question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom DNS breaks Reverse proxy configuration and activation emails.

See original GitHub issue

Hi Team!

I’ve setup Community Server using Docker on custom ports instead of 80 and 443 to be able to install other apps on our Linux server.

onlyoffice-community-server   onlyoffice4enterprise/communityserver-ee:8.9.2.27   3306/tcp, 5280/tcp, 9865-9866/tcp, 9871/tcp, 9882/tcp, 9888/tcp, 0.0.0.0:5222->5222/tcp, 0.0.0.0:8081->80/tcp, 0.0.0.0:4431->443/tcp

I’ve used an Apache Proxy virtual host to redirect to the container (we only need community server, no mail server, no document server).

  • If I set the Custom DNS setting to our hostname (https://onlyoffice.xxxxxx.com), this breaks mailing system and activation email links.
  • If I don’t set it, I get wrong activation email link. This seems legit because we are inside a Docker container. 450042771ab5 is the container internal hostname.
http://450042771ab5:8081/confirm.aspx?type=Activation

So the problem is why does OnlyOffice breaks my outgoing emails when I set Custom DNS ? Because I don’t want my users to edit manually their activation URL with the real hostname and port.

Here is my Apache configuration to proxy to the Docker Community Server container.

<VirtualHost *:80>
    ServerAdmin xxxxxxxxxxxx
    ServerName onlyoffice.xxxxxx.com

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName onlyoffice.xxxxxx.com
    ServerAdmin xxxxxxxxxxxx

    ProxyPass / http://localhost:8081/
    ProxyPassReverse / http://localhost:8081/

	SSLEngine on
	SSLCertificateFile /etc/letsencrypt/live/onlyoffice.xxxxxx.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/onlyoffice.xxxxxx.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/lets-encrypt-x3-cross-signed.pem
</VirtualHost>
</IfModule>

Thanks for your help.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
ambroisemaupatecommented, Jun 2, 2017

Response timeout issue seems to be gone after upgrading to latest CommunityServer Docker image version (v9.0.0.300).

1reaction
libardoramcommented, May 2, 2017

Try to add :

ProxyPreserveHost On

after the ServerName subdomain.domain.com I use nguni for the reverse proxy, but I think this should work for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

email - Reverse proxy for mail server?
I'm looking for options of how to setup a reverse proxy for a mail server. Very similar to how apache can reverse proxy...
Read more >
Reverse Proxy simplified guide : r/unRAID
137 votes, 49 comments. I am seeing a lot of post lately asking questions about setting up a reverse proxy for your own...
Read more >
Troubleshooting email issues - DNS
If you have issues sending or receiving mail, follow these troubleshooting steps.
Read more >
Kirby behind Nginx Reverse Proxy on separate hosts - Issues
I've tried setting some custom location settings and other things on the reverse proxy based on the different solutions proposed on the ...
Read more >
Using Cloudflare as a reverse proxy - Docs
Method one: Proxy using Cloudflare Workers · 1. Create a worker · 2. Configure the worker to act as a proxy · 3....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found