<div dir="auto">Are you sure you don't have a default vhost?<div dir="auto"><br></div><div dir="auto">Try adding a server name and input the server name in browser so you are sure you are hitting the correct server {} in the config.</div><div dir="auto">Or if you want to use IP ensure the vhost you add is the default.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19-Mar-2017 8:35 AM, "Jun Chen via nginx" <<a href="mailto:nginx@nginx.org">nginx@nginx.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7355">Hi All,</div><div id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7627"><br></div><div id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7611">I am setting my first reverse proxy by following online posts. The problem is that when I type the <a href="http://my_ip_address/my_rev" target="_blank">http://my_ip_address/my_rev</a> and it returns an 404 error:</div><div id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7610"><br></div><h1 id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7393">Not Found</h1>
<div id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7394">The requested URL was not found on the server.</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7395">If you entered the URL manually please check your spelling and try again.</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7515"><br></div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7399">Here is what I did:</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7409"><br></div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7426">1. installed nginx 1.10.0 on ubuntu 16.04</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7427">2. created file my_nx.conf under /etc/sites-available with following:</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7462"><br></div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7490"> server {<br id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7481"> listen 80;<br id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7482"> server_name my_ip_address; <br id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7483"><br id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7484"> location /my_rev {<br id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7485"> proxy_pass <a href="http://192.168.1.65:5000" target="_blank">http://192.168.1.65:5000</a>;<br id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7486"> include /etc/nginx/proxy_params;<br id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7487"> }<br id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7488"> }</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7662">3. Under /etc/sites-enabled, a symlink my_nx.conf was generated pointing to /etc/sites-available/my_nx.<wbr>conf</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7663">4. restart nginx <br></div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7664">5. On browser, type <a href="http://my_ip_address/my_rev" target="_blank">http://my_ip_address/my_rev</a> and, the error</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7665"><br></div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7666">The configuration seems very straightforward. Where have I missed? Many thanks.</div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7667"><br></div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7669">-Jun C<br></div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7428"><br></div><div dir="ltr" id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7429"><br></div><div id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7356"><br></div><div id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7383"><br></div><div id="m_-982844867740665048yui_3_16_0_ym19_1_1489891865759_7430"><br></div></div></div><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></div>