Welcome! Log In Create A New Profile

Advanced

Re: nginx not forwarding requests to backend servers.

Brian Pugh
July 27, 2016 12:10PM
Ok. This looks like progress. However it still fails. Here is my config as
it stands now.

in nginx.conf:

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

In default.conf:

server {

listen 443 ssl;
server_name myapplicationsite.net;
keepalive_timeout 70;

ssl_certificate /appssl/fd.crt;
ssl_certificate_key /appssl/lb.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;

location / {
proxy_pass http://myapplicationsite.net;
proxy_set_header HOST myapplicationsite.net;

}
}

And here is the errors I get:

On the web page:

502 bad gateway.

From the logs:

HTTP/1.1", upstream: *"http://192.168.155.120:80
http://192.168.155.120:80*/", host: "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
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






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
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: 110
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