Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

AWS Nginx and Confluence

Steve Boydon
Contributor
May 10, 2019

Hi,

So trying to setup Confluence on AWS with Nginx proxying to Tomcat.

I have two EC2s one for Nginx and one for Tomcat and Confluence.

AWS Security groups are set up to allow port 8090 from nginx security group. 

I have tested using command line from nginx to confluence instance using private dns and :8090. The setup page returns fine so I know nginx instance can see the private IP.

 

I have done very basic config settings and am not yet using HTTPS (my next journey)

 

So for sites-enabled confluence.conf I have

 


server {
   listen 80 default_server;
   listen [::]:80 default_server;

   server_name confluence.xxx.co.uk;


   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://ip-xxx.xxx.xxx.xxx.eu-west-2.compute.internal:8090;
   }
}


No errors when starting Nginx so syntax seems fine.

 

Confluence server.xml is

 

<Server port="8000" shutdown="SHUTDOWN" debug="0">
   <Service name="Tomcat-Standalone">
       <!--
        ==============================================================================================================
        DEFAULT - Direct connector with no proxy, for unproxied HTTP access to Confluence.

        If using a http/https proxy, comment out this connector.
        ==============================================================================================================
       -->
       <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"/>


 <Engine name="Standalone" defaultHost="localhost" debug="0">
           <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
               <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
                   <!-- 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="${confluence.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>
   </Service>
</Server>


Using this config it just times out and doesn't connect.

 

Any help appreciated

rgds

 

Steve

 

 

2 answers

0 votes
Steve Boydon
Contributor
May 12, 2019

All sorted now. Security groups were fine. I think there is a slight bug in ,6.15.4. a used 6.13 4 the same as on another device, and it now works 

0 votes
Danyal Iqbal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2019

The config looks ok on first glance. I would investigate the security group again. ( Maybe allow everything and get it working first and than restrict to the relevant port and restet)

Steve Boydon
Contributor
May 10, 2019

I've tried that :)

 

Going back to basics. 

 

thx

 

Steve

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events