<div dir="ltr">I may be wrong, but where is your proxy_pass statement?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 24, 2017 at 4:47 PM, p0lak <span dir="ltr"><<a href="mailto:nginx-forum@forum.nginx.org" target="_blank">nginx-forum@forum.nginx.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everybody,<br>
<br>
I have installed a dedicated server for NGINX based on Ubuntu Core<br>
<br>
I want to define this behavior<br>
<br>
NGINX Server (Public IP) >>> listening on port 80 >>> redirect to a LAN<br>
Server on port 80 (<a href="http://mylocalserver/virtualhost1" rel="noreferrer" target="_blank">http://mylocalserver/<wbr>virtualhost1</a>)<br>
NGINX Server (Public IP) >>> listening on port 81 >>> redirect to a LAN<br>
Server on port 80 (<a href="http://mylocalserver/virtualhost2" rel="noreferrer" target="_blank">http://mylocalserver/<wbr>virtualhost2</a>)<br>
<br>
My local virtualhost on my backend server is reachable (ie:<br>
<a href="http://mylocalserver/virtualhost1" rel="noreferrer" target="_blank">http://mylocalserver/<wbr>virtualhost1</a>)<br>
but my second virtualhost is not reachable (ie:<br>
<a href="http://mylocalserver/virtualhost2" rel="noreferrer" target="_blank">http://mylocalserver/<wbr>virtualhost2</a>)<br>
<br>
it is like the network port is closed but my firewall is accepting the<br>
flow.<br>
<br>
here is my configuration if you have any idea why my second virtualhost is<br>
not reachable<br>
<br>
##NGINX.CONF##<br>
<br>
user www-data;<br>
worker_processes 2;<br>
events {<br>
worker_connections 19000;<br>
}<br>
worker_rlimit_nofile 40000;<br>
http {<br>
<br>
client_body_timeout 5s;<br>
client_header_timeout 5s;<br>
keepalive_timeout 75s;<br>
send_timeout 15s;<br>
gzip on;<br>
gzip_disable "msie6";<br>
gzip_http_version 1.1;<br>
gzip_comp_level 5;<br>
gzip_min_length 256;<br>
gzip_proxied any;<br>
gzip_vary on;<br>
gzip_types<br>
application/atom+xml<br>
application/javascript<br>
application/json<br>
application/rss+xml<br>
application/vnd.ms-fontobject<br>
application/x-font-ttf<br>
application/x-web-app-<wbr>manifest+json<br>
application/xhtml+xml<br>
application/xml<br>
font/opentype<br>
image/svg+xml<br>
image/x-icon<br>
text/css<br>
text/plain<br>
text/x-component;<br>
<br>
client_max_body_size 100k;<br>
client_body_buffer_size 128k;<br>
client_body_in_single_buffer on;<br>
client_body_temp_path /var/nginx/client_body_temp;<br>
client_header_buffer_size 1k;<br>
large_client_header_buffers 4 4k;<br>
<br>
include /etc/nginx/conf.d/*.conf;<br>
include /etc/nginx/sites-enabled/*;<br>
}<br>
<br>
#PROXY.CONF#<br>
proxy_redirect on;<br>
proxy_set_header Host $host;<br>
proxy_set_header X-Real-IP $remote_addr;<br>
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
proxy_hide_header X-Powered-By;<br>
proxy_intercept_errors on;<br>
proxy_buffering on;<br>
<br>
<br>
proxy_cache_key "$scheme://$host$request_uri";<br>
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=cache:10m inactive=7d<br>
max_size=700m;<br>
<br>
<br>
#VIRTUALHOST 1<br>
server {<br>
listen 80;<br>
server_name virtualhost1;<br>
}<br>
<br>
#VIRTUALHOST 2<br>
server {<br>
listen 81;<br>
server_name virtualhost2;<br>
}<br>
<br>
<br>
Could you please help me regarding my issue,<br>
<br>
Thanks so much,<br>
<br>
Posted at Nginx Forum: <a href="https://forum.nginx.org/read.php?2,272606,272606#msg-272606" rel="noreferrer" target="_blank">https://forum.nginx.org/read.<wbr>php?2,272606,272606#msg-272606</a><br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>