Run Multiple Site from one IP with reverse proxy Nginx

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 50

  • @vishalparkar
    @vishalparkar 2 года назад +3

    Thank you very much ! Subscribed and liked !!
    One query though. at 5:56 did you paste the server block for the second site just below the first or just replaced the first with the second ? If this is the second case, then how did both the urls work if the config for the first is replaced ?

  • @kahelsoro
    @kahelsoro 3 года назад +1

    Thanks ma man! This really helped, other guides add a lot of information that it becomes overwhelming

  • @tanchienhao
    @tanchienhao 3 года назад +1

    at 6:01 how come you replaced the balckjack website? and also im curious what happened to the at 2:07. thank you for the great video! :D

  • @logicawe
    @logicawe 4 года назад +4

    Great video, thanks for sharing 👍. I am much more familiar with Apache so it was neat to see the equivalent on Nginx.

  • @tultr
    @tultr 3 года назад

    wow I went many years never knowing that sudo stands for Super User DO. Thanks for the tutorial!

    • @rukasu01
      @rukasu01 3 года назад +1

      Nah bruh it means Shut Up and Do as Ordered

  • @angelthekind1595
    @angelthekind1595 5 лет назад +3

    hi friend thanks for sharing! where did you store the index files of the site to bee on port 8081?

  • @PeterBatah
    @PeterBatah 3 года назад +1

    Thanks for sharing you time and experience with us. Quick question. Where does the content for the two sites reside? And would it require a folder for each of your sites?

    • @tanchienhao
      @tanchienhao 3 года назад +2

      they can reside anywhere they want as long as they are accessible on the ports. nginx simply redirects requests to the relevant ports. you can have a folder for each site for better organisation. hope this helps :)

    • @petertremblay3725
      @petertremblay3725 2 года назад

      @@tanchienhao I am confuse about the port change, i got 3 websites that i want to have on my vps and served by nginx so do i have to open new ports for each additional website? Thank for any help

    • @tanchienhao
      @tanchienhao 2 года назад +1

      @@petertremblay3725 yup two sites cannot run on the same port of the same computer

    • @petertremblay3725
      @petertremblay3725 2 года назад

      @@tanchienhao Thank i was confuse about that part since so many channel do thing differently! But if i set nginx as reverse proxy then more than 2 sites can be on same port correct?

  • @Scuffy
    @Scuffy 3 года назад

    Hello Im wondering how to host as https with nginx do you know how?

  • @techsapphire
    @techsapphire 4 года назад

    Can I reverse proxy any website on my domain?

  • @georgesmith3022
    @georgesmith3022 4 года назад

    this is how to proxy to different sites based on server name. This means you should run now nginx plus two more servers. If you want to run multiple servers on the same server you just need a different root folder and remove the proxy commands

  • @tarvinder91
    @tarvinder91 4 года назад

    There are some things which are not really clear else there is so much to learn from this video

  • @brunobernard86
    @brunobernard86 5 лет назад +1

    also, does it block access to: IP:PORT ? e.g someone manually go to 157.230.151.33:8080

    • @vedprakash-zz6hb
      @vedprakash-zz6hb 4 года назад

      Yes
      Use empty host and return 444 e.g
      server { listen 80; server_name ""; return 444; }
      Here, the server name is set to an empty string that will match requests without the “Host” header field, and a special nginx’s non-standard code 444 is returned that closes the connection.

  • @arivicivokkey
    @arivicivokkey 4 года назад

    do we need install bind9 to do this? (i know it's a noob question sorry about that :)

  • @JamesKaneF
    @JamesKaneF 3 года назад

    502 Bad Gateway How do I fix that?

  • @Asartheen_p
    @Asartheen_p 4 года назад

    hi...
    i need help from you iam working on java JSP page on the tomcat server i can access all post and get method in 80 port but not working in 443 what happens.. and what is the problem can you please explain me or fix this problem

    • @JuanNadal
      @JuanNadal  4 года назад

      You need to setup SSL for port 443

    • @Asartheen_p
      @Asartheen_p 4 года назад

      @@JuanNadal yes i did using cerbot... my question is why some functionality work in 80 not in 443

  • @srijansingh8272
    @srijansingh8272 4 года назад

    default server is working but another one is not working.
    Can anyone help me?

  • @RahulYadavhacker
    @RahulYadavhacker 3 года назад

    You saved my so much time. Thank you sooo much

  • @ahsanraza4762
    @ahsanraza4762 4 года назад

    Thank you for posting such great content. However, can we do the same thing by using IIS ?

  • @RichardApplegate
    @RichardApplegate 5 лет назад +2

    Thank you so much! so much appericate you made this simple.....

  • @dipanshuc
    @dipanshuc 4 года назад

    Thanks man! Your video was very informative.

  • @lotusmojo
    @lotusmojo 4 года назад

    do you have the same for windows 10?

  • @luit.s
    @luit.s 4 года назад

    I have a TL-WDR4300 router with openwrt nginx-ssl, acme and duckdns. I am struggling to install a reverse proxy any one have ever try anything like this?

  • @diosmio2009
    @diosmio2009 4 года назад

    Thank you very much for the clear explanation

  • @okenkhuman_logicbee
    @okenkhuman_logicbee 4 года назад

    I am trying to link multiole mqtt websockets on various domains... like e1.domain.com->mqtt1
    e2.domain.com->mqtt2...etc
    Please acknowledge me

  • @yugiohsc
    @yugiohsc 4 года назад

    You sound really similar to gotbletu! Thanks for the tutorial bro

  • @StefTechSurfer
    @StefTechSurfer 4 года назад

    How about if you have Cloudflare in between?

    • @weiiswurst
      @weiiswurst 4 года назад

      Cloudflare doesn't care, works fine with it.

  • @masudrana1983
    @masudrana1983 3 года назад

    Thanks. Love this one.

  • @LOVEUNEO
    @LOVEUNEO 4 года назад

    Can you provide ssl certificate to both the sites from your Nginx?

    • @svampebob007
      @svampebob007 4 года назад

      yes, you just need to sign the ssl certificate with the correct domain name and add it to the config file, or you could use a CA that way you only need to singe a single certificate.

  • @MuhammadAmir-ff8wl
    @MuhammadAmir-ff8wl 4 года назад

    Thanks Man you solve my problem

  • @colorghost
    @colorghost 3 года назад

    Thank you! 😄

  • @blackestwhite
    @blackestwhite 5 лет назад +3

    thanks man!

  • @nikhilsinha2191
    @nikhilsinha2191 2 года назад +1

    to achive the think which he did earlier edit the listen to 8080 or 8081 in the /etc/nginx/sites-available/{yourfilename} to get the desired results as him