Welcome! Log In Create A New Profile

Advanced

Error with nginx reverse proxy setup

Posted by Jun Chen via nginx 
Jun Chen via nginx
Error with nginx reverse proxy setup
March 19, 2017 04:10AM
Hi All,
I am setting my first reverse proxy by following online posts. The problem is that when I type the http://my_ip_address/my_rev and it returns an 404 error:

Not Found
The requested URL was not found on the server.If you entered the URL manually please check your spelling and try again.
Here is what I did:
1. installed nginx 1.10.0 on ubuntu 16.042. created file my_nx.conf under /etc/sites-available with following:
    server {
            listen 80;
            server_name my_ip_address;  

            location /my_rev {
                    proxy_pass http://192.168.1.65:5000;
                    include /etc/nginx/proxy_params;
            }
    }3. Under /etc/sites-enabled, a symlink my_nx.conf was generated pointing to /etc/sites-available/my_nx.conf4. restart nginx
5. On browser, type http://my_ip_address/my_rev and, the error
The configuration seems very straightforward. Where have I missed? Many thanks.
-Jun C





_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Anoop Alias
Re: Error with nginx reverse proxy setup
March 19, 2017 05:00AM
Are you sure you don't have a default vhost?

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.
Or if you want to use IP ensure the vhost you add is the default.

On 19-Mar-2017 8:35 AM, "Jun Chen via nginx" <[email protected]> wrote:

> Hi All,
>
> I am setting my first reverse proxy by following online posts. The problem
> is that when I type the http://my_ip_address/my_rev and it returns an 404
> error:
>
> Not Found
> The requested URL was not found on the server.
> If you entered the URL manually please check your spelling and try again.
>
> Here is what I did:
>
> 1. installed nginx 1.10.0 on ubuntu 16.04
> 2. created file my_nx.conf under /etc/sites-available with following:
>
> server {
> listen 80;
> server_name my_ip_address;
>
> location /my_rev {
> proxy_pass http://192.168.1.65:5000;
> include /etc/nginx/proxy_params;
> }
> }
> 3. Under /etc/sites-enabled, a symlink my_nx.conf was generated pointing
> to /etc/sites-available/my_nx.conf
> 4. restart nginx
> 5. On browser, type http://my_ip_address/my_rev and, the error
>
> The configuration seems very straightforward. Where have I missed? Many
> thanks.
>
> -Jun C
>
>
>
>
>
>
> _______________________________________________
> 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
Sorry, only registered users may post in this forum.

Click here to login