Welcome! Log In Create A New Profile

Advanced

Re: One NGINX server to 2 backend servers

Rajeev J Sebastian
February 27, 2017 12:00PM
I may be wrong, but where is your proxy_pass statement?

On Fri, Feb 24, 2017 at 4:47 PM, p0lak <nginx-forum@forum.nginx.org> wrote:

> Hello everybody,
>
> I have installed a dedicated server for NGINX based on Ubuntu Core
>
> I want to define this behavior
>
> NGINX Server (Public IP) >>> listening on port 80 >>> redirect to a LAN
> Server on port 80 (http://mylocalserver/virtualhost1)
> NGINX Server (Public IP) >>> listening on port 81 >>> redirect to a LAN
> Server on port 80 (http://mylocalserver/virtualhost2)
>
> My local virtualhost on my backend server is reachable (ie:
> http://mylocalserver/virtualhost1)
> but my second virtualhost is not reachable (ie:
> http://mylocalserver/virtualhost2)
>
> it is like the network port is closed but my firewall is accepting the
> flow.
>
> here is my configuration if you have any idea why my second virtualhost is
> not reachable
>
> ##NGINX.CONF##
>
> user www-data;
> worker_processes 2;
> events {
> worker_connections 19000;
> }
> worker_rlimit_nofile 40000;
> http {
>
> client_body_timeout 5s;
> client_header_timeout 5s;
> keepalive_timeout 75s;
> send_timeout 15s;
> gzip on;
> gzip_disable "msie6";
> gzip_http_version 1.1;
> gzip_comp_level 5;
> gzip_min_length 256;
> gzip_proxied any;
> gzip_vary on;
> gzip_types
> application/atom+xml
> application/javascript
> application/json
> application/rss+xml
> application/vnd.ms-fontobject
> application/x-font-ttf
> application/x-web-app-manifest+json
> application/xhtml+xml
> application/xml
> font/opentype
> image/svg+xml
> image/x-icon
> text/css
> text/plain
> text/x-component;
>
> client_max_body_size 100k;
> client_body_buffer_size 128k;
> client_body_in_single_buffer on;
> client_body_temp_path /var/nginx/client_body_temp;
> client_header_buffer_size 1k;
> large_client_header_buffers 4 4k;
>
> include /etc/nginx/conf.d/*.conf;
> include /etc/nginx/sites-enabled/*;
> }
>
> #PROXY.CONF#
> proxy_redirect on;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_hide_header X-Powered-By;
> proxy_intercept_errors on;
> proxy_buffering on;
>
>
> proxy_cache_key "$scheme://$host$request_uri";
> proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=cache:10m
> inactive=7d
> max_size=700m;
>
>
> #VIRTUALHOST 1
> server {
> listen 80;
> server_name virtualhost1;
> }
>
> #VIRTUALHOST 2
> server {
> listen 81;
> server_name virtualhost2;
> }
>
>
> Could you please help me regarding my issue,
>
> Thanks so much,
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,272606,272606#msg-272606
>
> _______________________________________________
> 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

One NGINX server to 2 backend servers

p0lak February 24, 2017 06:17AM

Re: One NGINX server to 2 backend servers

pratyush February 26, 2017 12:58AM

Re: One NGINX server to 2 backend servers

p0lak February 27, 2017 09:26AM

Re: One NGINX server to 2 backend servers

pratyush February 27, 2017 09:52AM

Re: One NGINX server to 2 backend servers

Rajeev J Sebastian February 27, 2017 12:00PM

Re: One NGINX server to 2 backend servers

p0lak March 02, 2017 05:17AM

Re: One NGINX server to 2 backend servers

Francis Daly March 04, 2017 03:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready