Using Nginx to Host Multiple Websites on One Server

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024
  • How to host multiple websites with Nginx.
    Checkout out this recipe on Dev Grub:
    devgrub.com/#/...
    --------------------
    DEV GRUB:
    devgrub.com/
    USE MY HOSTING LINK:
    m.do.co/c/ffbb...
    FACEBOOK:
    / garrettlove8
    TWITTER:
    / garrettlove8

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

  • @ComidaForFamiliasInc
    @ComidaForFamiliasInc 4 ปีที่แล้ว +6

    I spent 3 hours trying to figure out why it wouldn't load. I watch 10 minutes of your video and it works!

  • @blalmal10a
    @blalmal10a ปีที่แล้ว

    YOU TALIK TOO MUCH.. tutorial not on point.. well done though

  • @petertremblay3725
    @petertremblay3725 2 ปีที่แล้ว +1

    Hi there and thank for making this helpful tutorial but would it be possible to explain how to do the same but with ssl, i already have my key generated and i just need to setup nginx to work with my ssl keys. Key were generated with putty and i have 3 domains.

  • @sanjib.lamichhane
    @sanjib.lamichhane ปีที่แล้ว +1

  • @Tlcunha81
    @Tlcunha81 2 ปีที่แล้ว

    One thing I don't get. How is nginx set to port 80 for both domains. Isn't there a conflict?

  • @cog7india
    @cog7india 3 ปีที่แล้ว +1

    Will this example works for asp.net core multiple websites on nginx?

  • @fxstreamer238
    @fxstreamer238 4 ปีที่แล้ว +4

    You are not hosting two apps you are just hosting two static html files thats different and thats not the approach for running multiple websites with different nodejs apps.

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

      Ok, tell me more

    • @fxstreamer238
      @fxstreamer238 4 ปีที่แล้ว +4

      @@garrettlovetv You have to write two apps app1=require(express) , app2=require(express) . then connect to different ports and then assign the ports to the apps with nginx

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

      @@fxstreamer238 where can I read more about it?

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

      FxStreamer can you explain more about it

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

      @@fxstreamer238 my same problem.. :(

  • @Tlcunha81
    @Tlcunha81 2 ปีที่แล้ว

    One thing I don't get. How is nginx set to port 80 for both domains. Isn't there a conflict?

  • @lydi7845
    @lydi7845 5 ปีที่แล้ว +4

    Nice video! Does Nginx allow hosts to have root privilege across all the websites? For example, In my b2b software company, I need to be able to give clients basic front-end controls over their websites, but want to be able to auto-update our software that interfaces with each site, so we don't have to go into each client's website to make those updates? If anyone has an answer to this, I would be super appreciative.

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

      Didi you find any solution about this, I'm kinda in the same situation.
      It would be so helpful if you answered me!

    • @ashishmaurya5348
      @ashishmaurya5348 2 ปีที่แล้ว

      Same case please help

  • @andredehcastro
    @andredehcastro 2 ปีที่แล้ว

    thank you so much!!!!!

  • @cassenhari3992
    @cassenhari3992 2 ปีที่แล้ว

    the best + sub + like

  • @donny_bahama
    @donny_bahama 4 ปีที่แล้ว +2

    Thanks for this! Exactly what I’ve been looking for!

  • @zilog1
    @zilog1 2 ปีที่แล้ว

    eww a mac

  • @wetbadger2174
    @wetbadger2174 3 ปีที่แล้ว +1

    changing etc/nginx.conf broke my entire droplet

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

      actually it was my fault. never mess with permissions on your etc folder

  • @andyfeng6396
    @andyfeng6396 3 ปีที่แล้ว +1

    change your dns servers

  • @ohiasdxfcghbljokasdjhnfvaw4ehr
    @ohiasdxfcghbljokasdjhnfvaw4ehr 3 ปีที่แล้ว +5

    took me forever to figure out what this "engine X" thing was... I thought it was pronounced en-jinx

  • @Vstosky
    @Vstosky ปีที่แล้ว

    If someone did not notice the problem he fixed at 14:52 was that root was pointing to index.html. Roots cant be files but folders. That solved the issie

  • @logantheyoyoman
    @logantheyoyoman 4 ปีที่แล้ว +2

    You should look into remote ssh extension for vs code. Would save you all the click and dragging.

    • @marvin-kevinjuan2129
      @marvin-kevinjuan2129 4 ปีที่แล้ว

      Remote access with vscode? And loging in preferably as root user because of the missing permissions - which vscode needs to save.
      Not sure if serious ...

  • @BilalMohammed1988
    @BilalMohammed1988 ปีที่แล้ว

    Sooperb lecture. I was searching for this.. Thank you. ❤️❤️❤️

  • @cloud2181
    @cloud2181 2 ปีที่แล้ว

    Can you host multiple websites with different tech stacks on a VPS server?

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

    thanks a lot

  • @NoajmIsMyName
    @NoajmIsMyName 2 ปีที่แล้ว

    Love that fixing the issue along the way!

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

    Can you send a new dev grub recipe link?

  • @whatAIthinksOFit
    @whatAIthinksOFit ปีที่แล้ว

    This video sort my 30hrs tension in just 16 mins!!! Too good man

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

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

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

    how to deploy aws?

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

    Thanks for this!

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

    Thank you for the great explaination.

  • @Parendinate
    @Parendinate 2 ปีที่แล้ว

    I've just looking for this like a 1 month lol. Thank you so much! And your teaching style is really amazing. U are a one of the good "tutorial guy" on TH-cam haha. tysm

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

    April FOOL

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

    Your video helped me a lot to understand Nginx, thanks a lot!

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

    Thank you good sir, you helped alot

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

    Thanks. Appreciate live demo. (not edited fine-tuned)

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

      You got it, thanks for watching!

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

    Anyone knows what editor he is using?

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

    Great video! thank you so much!

  • @Asadraza-vy1cn
    @Asadraza-vy1cn 3 ปีที่แล้ว

    many thanks , great video .

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

    Great work, nice and descriptive tutorial. Thank you.

  • @jeremyr.7673
    @jeremyr.7673 4 ปีที่แล้ว

    Great video! Thanks for making this, seriously.

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

    Where’s your video explaining Subjects in RxJs?

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

      I have a video on component to component communication in Angular which uses subjects but I don't have one that explains Subjects in detail yet

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

    thanks , can you do one on certs for https

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

      Possibly, I don't really do Nginx stuff these days. Thanks for watching!

  • @thecondor5488
    @thecondor5488 5 ปีที่แล้ว +1

    Normally I wouldn't put a thumbs down on a video because these videos take effort and regardless of the content they are much appreciated. However, when the first file you go into is already in your editor and you don't explain where that file lives so WE can bring it up as well is just plain annoying.

    • @wexwexexort
      @wexwexexort 5 ปีที่แล้ว +1

      You are right actually but you can find it here /etc/nginx/nginx.conf
      Also; 09:35.

    • @garrettlovetv
      @garrettlovetv  4 ปีที่แล้ว +4

      Thank you Mert for pointing to where it can be found. But overall you’re right, I should have been more specific. Thank you for the feedback, I’ll try to be better with that in future videos

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

      I disagree. This video is not a nginx tutorial. There are tons of those already. This is a tutorial on how to host multiple sites on one droplet/instance, and there are very few tutorials on this specific thing. It assumes you already know the basics of nginx. For me it's 2 thumbs up, as it is. IMO this is not helpful feedback.

    • @tonysimuel861
      @tonysimuel861 4 ปีที่แล้ว +1

      @@motezart2867 You are obviously on a different level than some of us. I appreciate your perspective on the matter, however, any good tutorial doesn't "assume" the knowledge of their viewer unless they explicitly state that is what is happening. And even then, it's just nice not to start in the middle of a screen. You can start from a point of reference where everyone can be on the same page. Otherwise, no matter how good the video, if I can't get to the point where the instructor is it's worthless. I still appreciate the effort though. And my thumbs down does not indicate a bad video. :) Thanks again @Garrett for the video.