nginx proxy not able to redirect to bamboo server instance

I am  very new to the nginx implementation. .


Bamboo-1 server url : https://<bamboo1-server>.domain.com/;

As per my understanding,

I have implemented SSL(self signed) in the nginx server and now default.conf looks as below

erver {

listen 443;
server_name <nginx-server>;

ssl on;
ssl_certificate /etc/nginx/ssl/.crt;
ssl_certificate_key /etc/nginx/ssl/.key;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

location /bamboo1 {

proxy_pass https://<bamboo1-server>.domain.com/;



 

https://<proxy-server>/bamboo1 is giving 404 error. I don't want to configure context root in application side.

Please let me know if  this is feasible. 

2 answers

This widget could not be displayed.

Hello,

 

So you need to configure your tomcat (server.xml) in Bamboo with kind of the following:

&lt;Connector port="7990" 
     protocol="HTTP/1.1"
     connectionTimeout="20000"
     useBodyEncodingForURI="true"
     redirectPort="443"
     compression="on"
     compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
     secure="true"
     scheme="https"
     proxyName="mycompany.com" 
     proxyPort="443" /&gt;

 

Then you have to setup nginx with Bamboo:

 

server {
	listen          443;
    server_name     mycompany.com;
	
	ssl                  	on;
    ssl_certificate      	&lt;path/to/your/certificate&gt;;
    ssl_certificate_key  	&lt;path/to/your/certificate/key&gt;;
    ssl_session_timeout  	5m;
    ssl_protocols  			TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers  			HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers   on;
	
	# Optional optimisation - please refer to http://nginx.org/en/docs/http/configuring_https_servers.html
	# ssl_session_cache   shared:SSL:10m;
    location / {
        proxy_pass 			http://localhost:7990;
		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_set_header    X-Real-IP $remote_addr;
		proxy_redirect 		off;
    }
}
nginx -s reload

If you are using Linux servers that have hardening options on you have to configure those. 

 

All the configuration looks fine in my implementation.  My question was around context root.

 

I want to access https://<proxy-name>/bamboo1 without configuring the respective context root (/bamboo1) defining in bamboo server.xml. 

 

My NGINX implementation is working well when i configured bamboo1 as context root in server.xml, but without context root https://<proxy-name>/bamboo1 giving 404 erro

404 comes as page not found which is probably cause you are defining your bamboo server url wrong.

 

So what you are doing is pointing your server like this

My reverse proxy > connect to bamboo using proxy pass my reverse proxy > bamboo are you there in the reverse proxy? > return 404

 

Your proxy pass configuration is supposed to link to the bamboo address: 

 Like following:

location /bamboo1 {
        proxy_pass          http://bambooserver:bambooPort;
    
    }

As i mentioned above my proxy_pass configuration is same as you mentioned, but giving 404 error.

 

location /bamboo1 { 

proxy_pass https://bamboo1-server:port;

Are you using HTTPS in the Bamboo server also? Cause if not then it should be http.

Yes , i am using https in bamboo server. 

Which server are you using? 

Does it have SELinux? If yes have you checked that it doesn't stop anything?

 

Are you exiting the same domain? (Do you need to create CORS?)

 

The address answers from the proxy server?  

This widget could not be displayed.

All the configuration looks fine in my implementation.  My question was around context root.

 

I want to access https://<proxy-name>/bamboo1 without configuring the respective context root (/bamboo1) defining in bamboo server.xml. 

 

My NGINX implementation is working well when i configured bamboo1 as context root in server.xml, but without context root https://<proxy-name>/bamboo1 giving 404 error.

 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

124 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you