Configuring reverse proxy for multiple hostnames using nginx

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.พ. 2025

ความคิดเห็น • 32

  • @mraluochmaina9992
    @mraluochmaina9992 5 ปีที่แล้ว

    Vividly explained. Thank you, bro.Good job

  • @mohd0nazir
    @mohd0nazir 6 ปีที่แล้ว +1

    Awesome dear. Wonderful job. Appreciated

  • @techsapphire
    @techsapphire 4 ปีที่แล้ว

    Can I reverse proxy any website on my domain?

  • @charlie7975
    @charlie7975 6 ปีที่แล้ว +1

    Great video. All your hosts are on local host. What if there is another server? Do I just enter the other server ip address?

  • @PABLOVECH
    @PABLOVECH 3 ปีที่แล้ว

    Thanks a lot man! very useful

  • @amoyfish
    @amoyfish 7 ปีที่แล้ว +2

    you can use the vi command .yy for copy one line, p for paste the copy line ,nyy copy n lines...@Mahtab alam

  • @BradleyHerbst
    @BradleyHerbst 6 ปีที่แล้ว +1

    Nice video. Thank you.

  • @sjltv2832
    @sjltv2832 5 ปีที่แล้ว

    is applicable to send data by rtmp to different proxy based?

  • @serazummunirz
    @serazummunirz 6 ปีที่แล้ว +3

    10:03 How did you delete that "t"'... That's incredible.

    • @yohanescalvin641
      @yohanescalvin641 6 ปีที่แล้ว +2

      im crying HAHAHAHHA

    • @masterflitzer
      @masterflitzer 3 ปีที่แล้ว

      didn't he just press x twice in vi? or he typed d$ so it will delete everything from cursor to end of line (similar to dd which removes the entire line)

  • @7hroomy
    @7hroomy 3 ปีที่แล้ว

    Good video thank you!

  • @MuhammadMahirQ8
    @MuhammadMahirQ8 7 ปีที่แล้ว

    Assalam Walikum there Mahtab.. It's wonderful to learn from your tutorial.. such a clear and informative video honestly. I have seen your nginx videos and trying to learn them and you have thought me all those stuff where I was failed to find it on internet.
    I have grabbed a lot of information for nginx but I am still stuck at one stage if you can just track me the correct path please..
    Let me tell you that I am running nginx via Docker. Now I want to apply reverse proxy to many different host (All having different ips) I have for different purposes. such as 10.0.0.1 have mongoDB server, while 10.0.0.2 have mysql server and many other.. I just want to apply reverse proxy to them , but its kinda a difficult for me. I dnt knw wht file should I edit and wht script should I apply. CAn you please please help me Sir Mahtab.. Ill highly appreciate it.. and btw m ur fellow indian.

    • @alammahtab08
      @alammahtab08  7 ปีที่แล้ว +1

      Can you provide some more detail what you are trying to do, I understand you are running a nginx docker image. Are you also running mongodb and mysql as docker images. Tell me what you are trying to achieve, I will try to help.

    • @MuhammadMahirQ8
      @MuhammadMahirQ8 7 ปีที่แล้ว

      oooh thank GOD you replied.. Ok ill tell you the whole scenario. Please ask if you fail to understand.
      Well firstly, In my software house I have a server having many different applications running on different assigned ips. Now I can manage them using Citrix server alright? Now when i access the Xenserver (Citrix) which is my server I see many different applications running on different ips with few on windows instance while few on ubuntu instance.
      Example:- 10.0.0.1 ip does consist of mongoDB application running on ubuntu instance.
      10.0.0.2 ip does have the mysql app.
      10.0.0.3 ip does have apache server on.
      10.0.0.4 ip does have a ubuntu OS. and so sooo on.
      Now what I want is to apply these all ips a reverse proxy using NGINX. for that what I personally did was I made a clone ubuntu instance which had a ip of say 10.0.0.28. installed a nginx docker in there now I want to apply the reverse proxy to all of them.. Now the issue is i dnt knw wht file should I edit and wht script should i use.. And one more think is when i have installed the nginx, I cant find the SIte_enable and SIte_available folder by default whereas I have seen many tutorials where there is these folder by default..But I have somehow managed to make them myself.. but to apply reverse proxy to these ips I cant find a way.. Sorry for such a long post.
      Well hope you got it please ask me if its unclear. Thank you so soo much for your reply

    • @MuhammadMahirQ8
      @MuhammadMahirQ8 7 ปีที่แล้ว

      Its seriously been like 1 week and I cant find the solution for this. I have to solve this issue and report my office by monday. I am completely new to nginx.. Ill highly apprecaite it if you will lead me to the right way sir.

    • @alammahtab08
      @alammahtab08  7 ปีที่แล้ว

      So you have different applications running on different machines. For nginx reverse proxy to work, all requests have to be first intercepted by nginx. Once nginx intercepts the requests it will apply the rules that you specify in configuration file. As you said you are running xenserver so probably you are running all these applications on different virtual machines. I have never tried setting up reverse proxies for multiple VMs, its better you ask at serverfault.com and be very clear while asking the question.

    • @MuhammadMahirQ8
      @MuhammadMahirQ8 7 ปีที่แล้ว

      Thank you for your reply. I asked a lot but can't get a clear one. I have somehow started getting you, sir. I agree they all are running on different machines but u should bear in mind that they all have different IPs that is assigned by the router itself. So, therefore, to configure for a reverse proxy I just need an IP such as u input it for a website and every different machine has its own IP alright. just treat it as a website. hope u got it? Now can u kindly explain me in this sense? And also can you just tell me how to intercept it with nginx initially all the request.. please refer to any video or link if you know I'll highly appreciate it sir..
      thank you so much

  • @sush2142
    @sush2142 3 ปีที่แล้ว

    Can you please make a video on upstream hosts on ngnix?

  • @eduardoandrescastilloperer4810
    @eduardoandrescastilloperer4810 7 ปีที่แล้ว +1

    Brilliant

  • @mzw8374
    @mzw8374 6 ปีที่แล้ว

    HI, Can you give me a solution for case : If I wan to make some subdomain for example like web1.zulfikar.com web2.zulfikar.com in wordpress, how to setting the nginx and should I install 2 wordpress at once on my server? how do I put the root location ? If you have any link video about that, please share to me, Thanks before.

  • @gosnooky
    @gosnooky 6 ปีที่แล้ว

    Too bad this doesn't work on my Windows development machine. Proxy pass never resolves to the internal port, always to the NGINX welcome page. Oh well, back to Apache I suppose.

  • @prabu106
    @prabu106 6 ปีที่แล้ว

    Great..

  • @NikhilKumarrocks
    @NikhilKumarrocks 5 ปีที่แล้ว

    below are config ...only micro-note is working but not another one ???
    server {
    listen 80;
    server_name micro-note;
    location / {
    proxy_pass micro-note:8001/;
    }
    }
    server {
    listen 80;
    server_name micro-user;
    location / {
    proxy_pass micro-user:8000/;
    }
    }

  • @danielmoraes9637
    @danielmoraes9637 5 ปีที่แล้ว

    thanks

  • @danielmoraes9637
    @danielmoraes9637 5 ปีที่แล้ว

    works perfect

  • @artronics
    @artronics 7 ปีที่แล้ว +5

    you know you DON'T have to use vi ;)

  • @cubetamagica
    @cubetamagica 6 ปีที่แล้ว

    You should use `proxy_pass 127.0.0.1$request_uri;` to really pass any request to the backend.