Forum: NGINX SSL port other than 443

Posted by yashgt (Guest)
on 2012-08-30 13:51
(Received via mailing list)
Hi,

I have 2 server sections in my config. One runs on port 80 and SSL on 
443.
The other on port 83 and its SSL on 444:
        listen 83 default ;
        ## SSL directives might go here
        listen 444 ssl;
Once I restart nginx and run netstat -a I see port 443 being used but 
not
port 444. What might be the issue?

Regards,
Yash

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,230326,230326#msg-230326
Posted by Javi Lavandeira (Guest)
on 2012-08-30 15:05
(Received via mailing list)
Hi,

On 2012/08/30, at 20:50, "yashgt" <nginx-forum@nginx.us> wrote:

> I have 2 server sections in my config. One runs on port 80 and SSL on 443.
> The other on port 83 and its SSL on 444:
>        listen 83 default ;
>        ## SSL directives might go here
>        listen 444 ssl;
> Once I restart nginx and run netstat -a I see port 443 being used but not
> port 444. What might be the issue?

Are you trying to use the same IP address for both server sections?

Regards,

--
Javi Lavandeira

Twitter: @javilm
Blog: http://www.lavandeira.net/blog
Posted by yashgt (Guest)
on 2012-08-30 15:08
(Received via mailing list)
Yes. Same IP address. With no SSL, this works fine . I can access one 
app as
http://myserver/ and the other as http://myserver:83/.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,230326,230329#msg-230329
Posted by Javi Lavandeira (Guest)
on 2012-08-30 15:14
(Received via mailing list)
Hi,

On 2012/08/30, at 22:07, "yashgt" <nginx-forum@nginx.us> wrote:

> Yes. Same IP address. With no SSL, this works fine . I can access one app as
> http://myserver/ and the other as http://myserver:83/.

When working with SSL you need to use a different IP address for each 
SSL host.

Regards,
Posted by Igor Sysoev (Guest)
on 2012-08-30 15:25
(Received via mailing list)
On Aug 30, 2012, at 15:50 , yashgt wrote:

> Hi,
>
> I have 2 server sections in my config. One runs on port 80 and SSL on 443.
> The other on port 83 and its SSL on 444:
>        listen 83 default ;
>        ## SSL directives might go here
>        listen 444 ssl;
> Once I restart nginx and run netstat -a I see port 443 being used but not
> port 444. What might be the issue?

What does "nginx -t" show ?


--
Igor Sysoev
Posted by Igor Sysoev (Guest)
on 2012-08-30 15:25
(Received via mailing list)
On Aug 30, 2012, at 17:13 , Javi Lavandeira wrote:

> Hi,
>
> On 2012/08/30, at 22:07, "yashgt" <nginx-forum@nginx.us> wrote:
>
>> Yes. Same IP address. With no SSL, this works fine . I can access one app as
>> http://myserver/ and the other as http://myserver:83/.
>
> When working with SSL you need to use a different IP address for each SSL host.

If server ports are different, you can use one IP address.


--
Igor Sysoev
Posted by yashgt (Guest)
on 2012-08-30 15:27
(Received via mailing list)
root@v-enterprise15:/usr/local/pnp4nagios# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,230326,230333#msg-230333
Posted by yashgt (Guest)
on 2012-08-30 15:54
(Received via mailing list)
Here is my nginx detail:
# nginx -V
nginx: nginx version: nginx/1.0.5
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/etc/nginx
--conf-path=/etc/nginx/nginx.conf 
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi 
--lock-path=/var/lock/nginx.lock
--pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module
--with-http_dav_module --with-http_geoip_module
--with-http_gzip_static_module --with-http_image_filter_module
--with-http_realip_module --with-http_stub_status_module
--with-http_ssl_module --with-http_sub_module --with-http_xslt_module
--with-ipv6 --with-sha1=/usr/include/openssl 
--with-md5=/usr/include/openssl
--with-mail --with-mail_ssl_module
--add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-echo
--add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-upstream-fair

This doc says that it should be possible to share the same IP address. I 
use
latest browsers. I intend to have multiple server sections in the 
config,
each for a different app. I am using a self-signed certificate. Anything
special needs to be done to the cert?

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,230326,230335#msg-230335
Posted by yashgt (Guest)
on 2012-08-30 15:55
(Received via mailing list)
Posted by hussain (Guest)
on 2012-10-20 09:30
(Received via mailing list)
I am having the same issue.
Here is the server block of my nginx.conf -
#########
server{
                listen  8090 ssl;
                server_name foo.bar.com;

                ssl_certificate conf.d/ssl/foo.bar.com.crt;
                ssl_certificate_key conf.d/ssl/foo.bar.com.key;

                keepalive_timeout 60;

                location  / {
                        proxy_pass https://127.0.0.1:8010;

                        ### force timeouts if one of backend is died ##
                        proxy_next_upstream error timeout invalid_header
http_500 http_502 http_503;

                        ### Set headers ####
                        proxy_set_header Host $host;
                        proxy_set_header X-Real-IP $remote_addr;
                        proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;

                        ### Most PHP, Python, Rails, Java App can use 
this
header ###
                        proxy_set_header X-Forwarded-Proto https;

                        ### By default we don't want to redirect it ####
                        proxy_redirect     off;

                }
                location ~ /\.ht {
                        deny  all;
                }
        }
#########
As you can see I am using other port than 443. How do I make it work?

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,230326,232049#msg-232049
Posted by Edho Arief (Guest)
on 2012-10-21 04:29
(Received via mailing list)
On Sat, Oct 20, 2012 at 2:30 PM, hussain <nginx-forum@nginx.us> wrote:
> #########
> As you can see I am using other port than 443. How do I make it work?
>

You forgot to mention what the problem you're having. I'm guessing
your backend server isn't using ssl but you configured it as https
(proxy_pass https://). Try using http:// instead.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.