Welcome! Log In Create A New Profile

Advanced

SSL error : Same base url with different context path

Posted by debajyoti 
SSL error : Same base url with different context path
March 01, 2016 11:28PM
We have two Tomcat instances running on two different server . Both the tomcats are with https (SSL implemented at Tomact level)

Bamboo1 instance : https://bamboo.com

Bamboo 2 isnatnce : https://techiid-bamboo.com

We have to achieve/rename to same base url for both the bamboo instance but different context path

So bamboo 1 should be directly accessed by https://bamboo.com/bamboo1 and bamboo 2 would be https://bamboo.com/bamboo2.

Old DNS names https://techiid-bamboo.com and https://bamboo.com will be deleted.

I set up a below test instance for nginx running

Below is the content for default.conf

listen 80;
server_name nginx_server.com;
#root /etc/tomcat7/webapps/apple;

location /bamboo1 {
proxy_pass https://server1:443/;
include /etc/nginx/proxy.conf;

below is the content of /etc/nginx/proxy.conf

proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


When i am giving in url http://nginx_server.com/bamboo1 , its not returning anything and returning SSL error and the url changed to below

https://nginx_server.com:80/allPlans.action;jsessionid=54F4D80938906512BF1108D9368B8397 ( Though nginx server does not have SSL running , as SSL implmented in the target tomcat instances)


Error :

Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.

Please help me out.

Regards
Deb
Re: SSL error : Same base url with different context path
March 02, 2016 08:38AM
Hello,

As far as I know, you can't do that. You have to set up SSL with a certificate in nginx. Alternatively, you can use TCP forwarding and skip nginx but you will lose the headers that your backend probably requires.

If you must use a proxy, the client will have to connect to the proxy via HTTPS. If your backend is on a trusted internal network, nginx can do the SSL termination and you can then proxy to it via HTTP and save the cost of a second HTTPS connection. If not, you will need to use HTTPS on both ends. We use the former with one front end nginx server doing SSL terminations and proxying over trusted network via HTTP to different backends.

--
Jim Ohlstein
Re: SSL error : Same base url with different context path
March 02, 2016 06:42PM
Hi Jim,

I have very new to the nginx implementation. Our intention is to not show the original redirect url to the customer.
Bamboo-1 server url : https://<bamboo1-server>.auiag.corp/b1;

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>.auiag.corp/b1;



}
https://<proxy-server>/bamboo1 is taking me to the front page of bamboo-1server website and address bar is not showing bamboo-1server, but when ever i am clicking anything its giving 404 not found error with url in address bar https://<proxy-server-name>/b1/<page_name> .
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready