Nginx Notes

Nginx Notes

Reverse Proxy

Edit file conf/nginx.conf, add the following configurations to it:

stream {
    server {
        listen 1234;
        proxy_pass 192.168.1.2:2345;
    }
    
    server {
        ......ditto......
    }
}

And start the nignx. Now traffic through local tcp port 1234 will be forwarded to 192.168.1.2:2345 and traffic out will be backforwarded to the user.

發佈了14 篇原創文章 · 獲贊 0 · 訪問量 4364
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章