problem with running Confluence with nginx.
Asked by dmivsokolov:

We have a problem with running Confluence with nginx.

Confluence and nginx on one server.

Local address: 192.168.1.37  
External address: doc.rubetek.com

Our nginx config:  
server {  
listen 80 default;  
location /confluence {  
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/confluence>;  
}  
location /synchrony-proxy {  
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/synchrony-proxy>;  
proxy_http_version 1.1;  
proxy_set_header Upgrade $http_upgrade;  
proxy_set_header Connection "Upgrade";  
}  
}  
======================================  
In  
/opt/attlasian/confluence/bin/setenv.sh  
We added:  
CATALINA_OPTS="-Dsynchrony.proxy.enabled=true ${CATALINA_OPTS}"  
=============================  
In  
/var/atlassian/application-data/confluence/confluence.cfg.xm  
We added:  
\<property name="synchrony.proxy.enabled"\>true\</property\>  
===========================

Our server config:

/opt/attlasian/confluence/conf/server.xml

\<Server port="8000" shutdown="SHUTDOWN" debug="0"\>  
\<Service name="Tomcat-Standalone"\>  
\<Connector port="8090" connectionTimeout="20000" redirectPort="8443"  
maxThreads="48" minSpareThreads="10"  
enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"  
protocol="org.apache.coyote.http11.Http11NioProtocol"  
proxyName="doc.rubetek.com" proxyPort="80" /\>

\<Engine name="Standalone" defaultHost="localhost" debug="0"\>

\<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4"\>  
\<Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"\>  
\<!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --\>  
\<Manager pathname="" /\>  
\<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" /\>  
\</Context\>

\<Context path="/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true"\>  
\<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" /\>  
\</Context\>  
\</Host\>

\</Engine\>

==============================

But, when we launch confluence editor,  
One script file, will have url: <http://192.168.1.37:8090/synchrony-proxy/resources/js/vendor/sockjs.min.js>  
(on screenshot)

![2017-08-17 14.38.39.jpg](/t5/image/serverpage/image-id/4821i2343591F7152369B/image-size/large?v=v2&px=999 "2017-08-17 14.38.39.jpg")

Because of this doesn't work confluence editor.

<br />

Whats is this our error? Or maybe bag?


Answers:
author: AnnWorley
body: Please make sure the Base URL is set to http://doc.rubetek.com.

The server.xml you posted looks fine as far as proxyName and proxyPort.

Please check your configuration against these 2 documents:

[Troubleshooting Collaborative Editing](https://confluence.atlassian.com/doc/troubleshooting-collaborative-editing-858772087.html)

[How to use NGINX to proxy requests for Confluence](https://confluence.atlassian.com/confkb/how-to-use-nginx-to-proxy-requests-for-confluence-313459790.html)

I look forward to hearing what you find.

comments: author: dmivsokolov
body: How to change base url if we don't have system-administrator user? Where is this settings option stored, Is it somewhere in  
the configuration files or in the database? We have h2db.h2.db database


Tags: nginx

synchrony