Internet Allow per NGINX Proxy (External) with dyndns adress
Asked by Torsten Paul:

Hello,

Have a problem not being able to access the Confluence server from external. Somewhere there is something wrong with my settings.

The following has already been submitted: server is running local with internal network address 192.168.178.76:8090.

Nginx is installed and running without having any other proxy modules installed. Is there anything else that needs to be enabled and activated?

Created a custom dyn-dns-confluence.conf (/etc/nginx/sites-available) with the following content:

```
server {
listen 80;
listen [::]:80;
server_name subdomain.dyndns.de;

listen 999 default ssl;
ssl on;
ssl_certificate /etc/letsencrypt/live/subdomain.dyndns.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/subdomain.dyndns.de/privkey.pem;

ssl_session_timeout 5m;

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.178.76: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.178.76:8091/synchrony;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
```

SSL certificate Let's Encrypt is installed and running correctly.

On the router, port 999 is enabled and open.

the File had Settings:

/etc/nginx/nginx.conf

```
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
```

Settings:

/home/confluence/atlassian-confluence-7.10.2/conf/server.xml

```
<!--
==============================================================================================================
HTTPS - Proxying Confluence via Apache or Nginx over HTTPS

If you're proxying traffic to Confluence over HTTPS, uncomment the connector below and comment out the others.
Make sure you provide the right information for proxyName and proxyPort.

For more information see:
Apache - https://confluence.atlassian.com/x/PTT3MQ
nginx - https://confluence.atlassian.com/x/cNIvMw
==============================================================================================================
-->

<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"
scheme="https" secure="true" proxyName="topale7.ddnss.de" proxyPort="999"/>

<Engine name="Standalone" defaultHost="192.168.178.76" debug="0">
<Host name="192.168.178.76" 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>
```

When browsing to <https://subdomain.dyndns.de:999> it only shows me the start page of nginx.

/usr/share/nginx/html/index.html

????

It seems that the proxy is not working yet. Where is my error or is something missing in the settings?

On the server, the base URL was changed to:

<https://subdomain.dyndns.de:999> from <http://192.168.178.76:8090>

Thanks


Answers:
author: Torsten Paul
body: Thank you for waiting 10 hours for an answer here. For this you now pay a license! For what actually? Now try to solve the problem yourself. Help from Atlassian is no longer needed. Have a nice evening !


Tags: confluence-server

nginx

proxy

server