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)

Collapse
 
lamri_abdellahramdane_15 profile image
Lamri Abdellah Ramdane

Clean guide! I love the simplicity—downloading Nginx for Windows, launching it, and adding a basic proxy_pass rule really demystifies reverse proxy setup. On Windows, I’ve also been using ServBay, which lets me launch Nginx, PHP, Node.js, databases, HTTPS, and more with just a click—no manual config juggling.

Collapse
 
mustafasamedyeyin profile image
MustafaSamedYeyin

Thanks for feedback 🙏