Welcome! Log In Create A New Profile

Advanced

Re: Nginx as Reverse Proxy for Tomcat + SSL

November 19, 2009 06:50AM
Thanks Maxim,

So i tried the setup, SSL connection between the client and Nginx ( ssl terminating at nginx) and then unencrypted from Nginx to Tomcat.

This is what my nginx.conf file looks like....

user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

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

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

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;

gzip on;

include /etc/nginx/sites-enabled/*;



server {

server_name himesh.com;
listen 192.168.1.118:443;
ssl on;
ssl_certificate /etc/pound/himesh_com.crt;
ssl_certificate_key /etc/pound/himesh.key;

access_log /etc/pound/access.log;

location / {
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://10.10.1.113:8080/;
proxy_redirect off;
}
}

}


Now form the client when i try [b]https://himesh.com[/b] i get the the tomcat default page, that is all good.

But [b]https://himesh.com/abc[/b] ( abc is an application deployed in tomcat), the browser returns [b]http://himesh.com/abc[/b] but now i don't have nginx listening on 80, so there is no answer . This only happens with https. It works fine when iam using just http..

Please advice..

Thank you,
himesh.
SubjectAuthorPosted

Nginx as Reverse Proxy for Tomcat + SSL

himeshNovember 19, 2009 06:02AM

Re: Nginx as Reverse Proxy for Tomcat + SSL

Maxim DouninNovember 19, 2009 06:32AM

Re: Nginx as Reverse Proxy for Tomcat + SSL

himeshNovember 19, 2009 06:50AM

Re: Nginx as Reverse Proxy for Tomcat + SSL

Maxim DouninNovember 19, 2009 07:04AM

Re: Nginx as Reverse Proxy for Tomcat + SSL

sajan tharayilAugust 21, 2013 07:06AM

SV: Nginx as Reverse Proxy for Tomcat + SSL

Jens RantilAugust 21, 2013 07:50AM

Re: Nginx as Reverse Proxy for Tomcat + SSL

unclepiemanAugust 27, 2013 01:24AM

Re: Nginx as Reverse Proxy for Tomcat + SSL

sajan tharayilAugust 21, 2013 02:04PM

SV: Nginx as Reverse Proxy for Tomcat + SSL

Jens RantilAugust 22, 2013 07:54AM

Re: Nginx as Reverse Proxy for Tomcat + SSL

sajan tharayilAugust 23, 2013 12:04AM

Re: Nginx as Reverse Proxy for Tomcat + SSL

dt0xAugust 27, 2013 01:11AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready