<div dir="ltr">can you move the backend server declaration from your .conf file to the nginx.conf file inside the http stanza?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 5, 2016 at 10:05 AM, NdridCold . <span dir="ltr"><<a href="mailto:project722@gmail.com" target="_blank">project722@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, However I did not have the entire stanza un-commented out. I have done that, but now I am encountered with a different error message. Now I get:<div><br></div><div>nginx: [emerg] host not found in upstream "<a href="http://resolveservergroup.com" target="_blank">resolveservergroup.com</a>" in /etc/nginx/conf.d/default.conf:40<br></div><div><br></div><div>Here is my default.conf file:</div><div><br></div><div><div>upstream <a href="http://backendservergroup.com" target="_blank">backendservergroup.com</a> {</div><div> # Use ip hash for session persistance</div><div> ip_hash;</div><div> # backend server 1</div><div> server 192.168.155.120;</div><div> # backend server 2</div><div> server 192.168.155.126;</div><div> # backend server 3</div><div> server 192.168.155.127;</div><div><br></div><div> # The below only works on nginx plus</div><div> #sticky route $route_cookie $route_uri;</div><div>}</div><div>server {</div><div><br></div><div> listen 80;</div><div> server_name <a href="http://nginxserver.com" target="_blank">nginxserver.com</a>;</div><div> keepalive_timeout 70;</div><div><br></div><div> #charset koi8-r;</div><div> #access_log /var/log/nginx/log/host.access.log main;</div><div><br></div><div> location / {</div><div> root /usr/share/nginx/html;</div><div> index index.html index.htm;</div><div> }</div><div><br></div><div> #error_page 404 /404.html;</div><div><br></div><div> # redirect server error pages to the static page /50x.html</div><div> #</div><div> error_page 500 502 503 504 /50x.html;</div><div> location = /50x.html {</div><div> root /usr/share/nginx/html;</div><div> }</div><div><br></div><div> # proxy the PHP scripts to Apache listening on <a href="http://127.0.0.1:80" target="_blank">127.0.0.1:80</a></div><div> #</div><div> location ~ \.php$ {</div><div> proxy_pass <a href="http://backendservergroup.com" target="_blank">http://backendservergroup.com</a>;</div><div> proxy_http_version 1.1;</div><div> proxy_set_header Connection "";</div><div> }</div><div><br></div><div> # pass the PHP scripts to FastCGI server listening on <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a></div><div> #</div><div> #location ~ \.php$ {</div><div> # root html;</div></div><div> # fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;</div><div> # fastcgi_index index.php;</div><div> # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;</div><div> # include fastcgi_params; </div><div> #} </div><div><br></div><div> # deny access to .htaccess files, if Apache's document root</div><div> # concurs with nginx's one </div><div> # </div><div> #location ~ /\.ht {</div><div> # deny all;</div><div> #} </div><div>}</div><div><br></div><div>server {</div><div><br></div><div> listen 443 ssl;</div><div> server_name <a href="http://nginxserver.com" target="_blank">nginxserver.com</a>;</div><div> keepalive_timeout 70;</div><div><br></div><div> #charset koi8-r;</div><div> #access_log /var/log/nginx/log/host.access.log main;</div><div><br></div><div> location / {</div><div> root /usr/share/nginx/html;</div><div> index index.html index.htm;</div><div> }</div><div><br></div><div> #error_page 404 /404.html;</div><div><br></div><div> # redirect server error pages to the static page /50x.html</div><div> #</div><div> error_page 500 502 503 504 /50x.html;</div><div> location = /50x.html {</div><div> root /usr/share/nginx/html;</div><div> }</div><div><br></div><div> # proxy the PHP scripts to Apache listening on <a href="http://127.0.0.1:80" target="_blank">127.0.0.1:80</a></div><div> #</div><div> location ~ \.php$ {</div><div> proxy_pass <a href="https://backendservergroup.com:443" target="_blank">https://backendservergroup.com:443</a>;</div><div> proxy_http_version 1.1;</div><div> proxy_set_header Connection "";</div><div><div>}</div><div><br></div><div> # pass the PHP scripts to FastCGI server listening on <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a></div><div> # </div><div> #location ~ \.php$ {</div><div> # root html;</div><div> # fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;</div><div> # fastcgi_index index.php;</div><div> # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;</div><div> # include fastcgi_params; </div><div> #} </div><div><br></div><div> # deny access to .htaccess files, if Apache's document root</div><div> # concurs with nginx's one </div><div> # </div><div> #location ~ /\.ht {</div><div> # deny all;</div><div> #} </div></div><div><div class="h5"><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 5, 2016 at 9:47 AM, Drew Turner <span dir="ltr"><<a href="mailto:drew@drewnturner.com" target="_blank">drew@drewnturner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Yes that is in proxy_pass. Are you sure proxy_pass is defined in the server stanza and that it's inside an include stanza?<div><br></div><div>Posting the code would be helpful if you can redact the sensitive information.</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 5, 2016 at 9:41 AM, Brian Pugh <span dir="ltr"><<a href="mailto:bpugh@cscontract.com" target="_blank">bpugh@cscontract.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;background-color:rgb(255,255,255)">
<p>Are you referring to the proxy pass declaration? If so I get an error when I uncomment that line out saying "nginx: [emerg] "proxy_pass" directive is not allowed here in /etc/nginx/conf.d/default.conf:40"<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>
<div name="divtagdefaultwrapper">
<div name="divtagdefaultwrapper">
</div>
</div>
</div>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> nginx <<a href="mailto:nginx-bounces@nginx.org" target="_blank">nginx-bounces@nginx.org</a>> on behalf of Drew Turner <<a href="mailto:drew@drewnturner.com" target="_blank">drew@drewnturner.com</a>><br>
<b>Sent:</b> Tuesday, July 5, 2016 9:33 AM<br>
<b>To:</b> <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<b>Subject:</b> Re: does nginx forward requests to backend servers using http or https?</font>
<div> </div>
</div><div><div>
<div>
<div dir="ltr">You define what you want it sent to the backend as. So if you use
<a href="http://backendserver" target="_blank">http://backendserver</a> it's http, if <a href="https://backendserver:443" target="_blank">
https://backendserver:443</a> - https.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jul 5, 2016 at 9:26 AM, Brian Pugh <span dir="ltr">
<<a href="mailto:bpugh@cscontract.com" target="_blank">bpugh@cscontract.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Arial,Helvetica,sans-serif;background-color:rgb(255,255,255)">
<p>I am using the free version of nginx on RHEL 6.7. The version is :<br>
</p>
<p><br>
</p>
<p><span style="font-size:12pt">nginx-1.10.1-1.el6.ngx.x86_64</span><br>
</p>
<p><span style="font-size:12pt"><br>
</span></p>
<p><span style="font-size:12pt">When using nginx as a load balancer I would like to know if nginx forwards requests to backend servers using http or https?</span></p>
<p> <br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div></div></div></div>
<br>_______________________________________________<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/mailman/listinfo/nginx</a><br></blockquote></div><br></div>