Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Configure Crucible with nginx reverse proxy and SSL

Gregory Johnson December 16, 2017

Wrote a question and it disappeared somehow, so if this is a duplicate post, apologies.

I'm running Crucible in Docker, and have an nginx reverse proxy (https-portal) in front of it.

My nginx config is generated:

server {
listen 443 ssl http2;
server_name crucible.myserver.com;

ssl on;
ssl_certificate /var/lib/https-portal/crucible.myserver.com/production/chained.pem;
ssl_certificate_key /var/lib/https-portal/crucible.myserver.com/production/domain.key;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:50m;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA;
ssl_prefer_server_ciphers on;

ssl_dhparam /var/lib/https-portal/dhparam.pem;

# Prevent Nginx from leaking the first TLS config
if ($host != $server_name) {
return 444;
}


location / {

proxy_pass http://crucible_crucible_1:8080;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;


}

}

 

 

My crucible config for my web-server is currently empty, which works if I access the application outside of the context of my reverse proxy (ie: if I turn it off), and use http and port 8080:

<web-server>
<http bind=":8080" />
</web-server>

However, I want to access it as https://crucible.myserver.com.

 

Thank you in advance.

 

Greg

 

2 answers

1 accepted

2 votes
Answer accepted
Lars Olav Velle
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.
December 17, 2017

Go to https://crucible.example.com/admin/viewServerSettings.do

Set the following:

Proxy scheme https
Proxy host crucible.example.com
Proxy port 443
Site URL https://crucible.example.com

Lars Olav Velle
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.
December 17, 2017

The config.xml would be:

<web-server site-url="https://crucible.example.com">
<http bind=":8060" proxy-host="crucible.example.com" proxy-port="443" proxy-scheme="https"/>
</web-server>

Like Joe Bennett likes this
Gregory Johnson December 19, 2017

This worked out great!  Thanks.  Strange since I think I had tried multiple combinations of the above, but I guess I never quite landed on the correct one.

0 votes
brian.pang@commscope.com August 10, 2023

I configured the nginx for Ubuntu 16.04, Can someone show me the default setting?

/etc/nginx/sites-available/default

 

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events