Trouble with 6.7 Reverse Proxy
Asked by Jared Scott:

Hello,

As you can see attached, some pages load up perfect. However the space page and the administration page seem like their CSS is broken? I've been through the search endless times, and tried a couple reinstalls, but I am really stuck with this one.

Thank you for looking and your help!

Specification:

* [Confluence 6.7 Docker Image](https://hub.docker.com/r/atlassian/confluence-server/)
* NGINX
* Cloudflare (Rocketloader Disabled)
* Base URL: <https://confluence.domain.ca>

Compose:

```
confluence:
 image: atlassian/confluence-server:latest
 container_name: confluence
 restart: always
 depends_on:
 - confluence-postgres
 links:
 - confluence-postgres:postgres
 ports: 
 - 8090:8090
 - 8091:8091
 volumes:
 - /etc/localtime:/etc/localtime:ro
 - /data/confluence:/var/atlassian/application-data/confluence
 environment:
 - CATALINA_CONNECTOR_PROXYNAME=confluence.domain.ca
 - CATALINA_CONNECTOR_PROXYPORT=443
 - CATALINA_CONNECTOR_SCHEME=https
 - CATALINA_CONNECTOR_SECURE=true
```

NGINX:

```
server {
 listen 443 ssl;
 listen [::]:443 ssl;
 server_name confluence.domain.ca;

ssl on;
 ssl_certificate /ssl/domain.ca.crt;
 ssl_certificate_key /ssl/domain.ca.key;
 ssl_client_certificate /ssl/cloudflare.crt;
 ssl_verify_client on;

ssl_session_timeout 1d;
 ssl_session_cache shared:SSL:10m;
 ssl_session_tickets off;

ssl_protocols TLSv1.2;
 ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
 ssl_prefer_server_ciphers on;
 
 add_header X-Frame-Options SAMEORIGIN;
 add_header X-Content-Type-Options nosniff;
 add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
 add_header Public-Key-Pins 'pin-sha256="4oJ2KeBkMYe5h+TNx691Sfa4fAXQctC1De0tmi/H68A="; pin-sha256="x9SZw6TwIqfmvrLZ/kz1o0Ossjmn728BnBKpUFqGNVM="; pin-sha256="58qRu/uxh4gFezqAcERupSkRYBlBAvfcw7mEjGPLnNU="; pin-sha256="lCppFqbkrlJ3EcVFAkeip0+44VaoJUymbnOaEUk7tEU="; pin-sha256="Kwdu/YyJtsA0Ls2vUmH1pfF24nXvQ7PKr5DVBQwwk5k="; max-age=2592000; includeSubDomains';
 add_header Referrer-Policy 'strict-origin';

real_ip_header X-Forwarded-For;

location / {
 client_max_body_size 100m;
 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://192.168.1.37:8090;
 }
 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://192.168.1.37:8091/synchrony;
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection "Upgrade";
 }
}
```

Everything is mostly working, but when I get to the editor or the admin pages, the CSS won't load correctly?

Broken Admin:

![bad_adminbroken.PNG](/t5/image/serverpage/image-id/13983i359C0D9B9DF9F750/image-size/large?v=v2&px=999 "bad_adminbroken.PNG")Broken Space:

![bad_spacebroken.PNG](/t5/image/serverpage/image-id/13984iC978811C75695B76/image-size/large?v=v2&px=999 "bad_spacebroken.PNG")

Working Fine Otherwise:

![good_loginok.PNG](/t5/image/serverpage/image-id/13985i13529771261FFFC5/image-size/large?v=v2&px=999 "good_loginok.PNG")![good_editorok.PNG](/t5/image/serverpage/image-id/13987i336111D2953293A6/image-size/large?v=v2&px=999 "good_editorok.PNG")![good_homeok.PNG](/t5/image/serverpage/image-id/13986i878E715206272E2E/image-size/large?v=v2&px=999 "good_homeok.PNG")


Answers:
author: Panos
body: Any error in the js console or log file?

comments: author: Jared Scott
body: Hi Panos,

Yes I think I fixed things, I believe this was cloudflare. I had explicitly disabled rocketloader but apparently that was still not enough.

I was still getting:

```
rocket.min.js:2_ @ rocket.min.js:2 n.complete @ rocket.min.js:2u @ rocket.min.js:2
c.onreadystatechange @ rocket.min.js:2XMLHttpRequest.send (async)
b @ rocket.min.js:2c @ rocket.min.js:2
y @ rocket.min.js:2(anonymous) @ rocket.min.js:2e @ rocket.min.js:2
characterData (async)(anonymous) @ rocket.min.js:2t @ rocket.min.js:2
w @ rocket.min.js:2(anonymous) @ rocket.min.js:2x @ rocket.min.js:2
e @ rocket.min.js:4 scan @ rocket.min.js:4 e @ rocket.min.js:4 setTimeout (async)
e @ rocket.min.js:4 start @ rocket.min.js:4 (anonymous) @ rocket.min.js:4
(anonymous) @ rocket.min.js:4 (anonymous) @ rocket.min.js:5 batch.js?locale=en-GB:589
```

The fix on Cloudflare was to completely disable performance, not just rocketloader:

![disableperf.png](https://community.atlassian.com/t5/image/serverpage/image-id/13988i711F7D1F059A32E0/image-size/large?v=v2&px=999 "disableperf.png")

Thanks!


Tags: nginx

reverse-proxy