Confluence behind nginx reverse proxy with HTTPS
Asked by Thomas Bella:

Hello.

I'm trying to provide confluence behind a reverse proxy with https. I confugured within the file server.xml the following content within the connector parameter:

```
proxyName="wiki.example.com" proxyPort="443" scheme="https"
```

I'm using the following nginx configuration:

```
server {    listen 443 ssl http2;    listen [::]:443 ssl http2;    server_name wiki.example.com;    ssl_certificate         /etc/letsencrypt/live/wiki.example.com/fullchain.pem;    ssl_certificate_key     /etc/letsencrypt/live/wiki.example.com/privkey.pem;    ssl_trusted_certificate /etc/letsencrypt/live/wiki.example.com/chain.pem;    location /synchrony {        proxy_set_header X-Forwarded-Host $host;        proxy_set_header X-Forwarded-Server $host;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_pass http://localhost:8091/synchrony;        proxy_http_version 1.1;        proxy_set_header Upgrade $http_upgrade;        proxy_set_header Connection "Upgrade";    }    location / {        client_max_body_size 128m;        proxy_set_header X-Forwarded-Host $host;        proxy_set_header X-Forwarded-Server $host;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_pass http://localhost:8090;    }}
```

If I want to edit a page, the page requests to <https://wiki.example.com/heartbeat> which does not exist.

![20170616-00rhn0putjig.png](/t5/image/serverpage/image-id/2220iAA8AFA474AA754B1/image-size/large?v=v2&px=999 "20170616-00rhn0putjig.png")

This results into endless loading of the page.

![confluence-err.PNG](/t5/image/serverpage/image-id/2221iE6F5C8C64B72FD6F/image-size/large?v=v2&px=999 "confluence-err.PNG")

I added synchrony.proxy.enabled to confluence.cfg.xml but nothing changed.

```
<property name="synchrony.proxy.enabled">true</property>
```

Server Base URL is set to <https://wiki.example.com>

I'm using Confluence 6.2.2 on Ubuntu 16.04 with Java 1.8.0_131 and MySQL backend.

What can I do to resolve the problem?


Answers:
author: Steven Behnke
body: The heartbeat URL has nothing to do with this issue. That's misleading you.

Post the full browser content of errors and include the errors in your proxy log and the catalina.out log.

comments: author: Thomas Bella
body: Browser output (Dev console):  
<https://pastebin.com/taBGq1nG>

As Image:  
<https://ururl.tk/20170616-11a8d3u0srzo.png>  
<https://ururl.tk/20170616-11i3p5ld0pn2.png>  
<https://ururl.tk/20170616-118wu6xlfulf.png>

nginx does not throw any error within error.log. Within access.log, the following requests haven't 200 status code:

```
1XX.1XX.1XX.180 - - [16/Jun/2017:11:41:21 +0200] "GET /heartbeat?_=1497606081605 HTTP/2.0" 404 8381 "https://wiki.example.com/pages/editpage.action?useDraft=true&spaceKey=TEST&draftId=15302657&pageId=14843905&&" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36"
```

catalina.out contains the following content:  
<https://pastebin.com/sxZtRe35>


author: obr5 NA
body: Restart Synchrony helps for me!

<https://confluence.atlassian.com/confkb/unable-to-edit-any-pages-in-confluence-6-x-due-to-collaborative-editing-867362716.html>