DEV Community

MustafaSamedYeyin
MustafaSamedYeyin

Posted on • Edited on

Create Basic Reverse Proxy with Nginx

After download zip file,

  • Unzip the file.
  • Locate the folder in cmd.
  • Write

start nginx

  • Create basic mvc application

  • And Run the project :

  • Open nginx-1.28.0\conf location (It could be different version for you):

I added these line for our mvc project:


server {
        listen       4321;
        server_name  dotnetRedirect.localhost;

        location / {
            proxy_pass http://localhost:5057;
        }
    }

Enter fullscreen mode Exit fullscreen mode
  • After above steps you should inform nginx for changes in nginx.conf file, to do this write below command where nginx.exe located.

nginx.exe -s reload

  • Goto browser and type :

http://dotnetredirect.localhost:4321/

Mustafa Samed Yeyin,
Best Regards.

Top comments (2)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.