Welcome! Log In Create A New Profile

Advanced

Re: nginx not forwarding requests to backend servers.

Reinis Rozitis
July 27, 2016 12:20PM
> : "myapplicationsite.net"
> 2016/07/27 10:54:05 [warn] 27491#27491: *3 upstream server temporarily
> disabled while connecting to upstream, client: 192.168.254.202, server:
> myapplicationsite.net, request: "GET / HTTP/1.1", upstream:
> "http://192.168.155.120:80/", host: "myapplicationsite.net"

> Why is it trying to connect to my servers over port 80? I need to pass it
> over on 443. How can I accomplish this? Even if I change the proxy pass to
> https in the logs it still trys

As you don't specify the port in upstream {} block nginx uses the default
which is 80 (
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#server )

Also for secure backend connection you should enable proxy_ssl.

Reading https://www.nginx.com/resources/admin-guide/nginx-tcp-ssl-upstreams/
should probably be a good start.


rr




On Wed, Jul 27, 2016 at 10:42 AM, Reinis Rozitis <r@roze.lv> wrote:
Can anyone give me an example config of what it would look like in both
nginx.conf and default.conf using the names/info I have provided?

It seems you have taken the default configuration example but if you use
nginx as a balancer without serving any .php (or other) files you actually
don't need those *.php etc locations - a single location / {} will do the
job (means all requests go to backends).

For example:


http {
upstream myappliationsite.net {
ip_hash;
server backendappsite1.net;
server backendappsite2.net;
server backendappsite3.net;
}

server {
listen 80;
listen 443 ssl;

server_name myappliationsite.net;

location / {
proxy_pass http://myappliationsite.net;
proxy_set_header HOST myappliationsite.net;
}
}



_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx







_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx not forwarding requests to backend servers.

Brian Pugh July 27, 2016 08:34AM

Re: nginx not forwarding requests to backend servers.

Francis Daly July 27, 2016 10:50AM

Re: nginx not forwarding requests to backend servers.

Brian Pugh July 27, 2016 11:26AM

Re: nginx not forwarding requests to backend servers.

Reinis Rozitis July 27, 2016 11:44AM

Re: nginx not forwarding requests to backend servers.

Brian Pugh July 27, 2016 12:10PM

Re: nginx not forwarding requests to backend servers.

crasyangel July 27, 2016 12:17PM

Re: nginx not forwarding requests to backend servers.

Reinis Rozitis July 27, 2016 12:20PM

Re: nginx not forwarding requests to backend servers.

Brian Pugh July 27, 2016 01:08PM

Re: nginx not forwarding requests to backend servers.

Brian Pugh July 27, 2016 01:18PM

Re: nginx not forwarding requests to backend servers.

Brian Pugh July 27, 2016 03:04PM

Re: nginx not forwarding requests to backend servers.

Reinis Rozitis July 27, 2016 03:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 252
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