Configuring nginx

I have an issue configuring nginx

My app sitting in /var/webapi

My config sitting in /etc/nginx/sites-available/webapi

server { listen 80;;

        location / {
                proxy_pass http://localhost:5000;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection keep-alive;
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        } }

I am running my webapi in port 5000:

[email protected]:~$ dotnet /var/webapi/WebApi.dll
Hosting environment: Production
Content root path: /home/Me
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.

When I am navigating the browser I am getting 404 error - no any page displayed

Need help.

0 Replies


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct