Computer NetworksNETWORKS

How to Host Multiple Websites on One Public IP Address | Setting up an NginX Reverse Proxy Server

Learn how to securely host multiple websites on the same public IP address using an NginX Reverse Proxy Server on Ubuntu 20.04 LTS.

Support the channel with crypto:
LBRY: bU7mCjdUzd7c92xSMaQo6n9vraq9tDrTKW

Read the accompanying blog post at https://www.yeetpc.com/blog/nginx-reverse-proxy/

Links:

GitHub repo with sample config files: https://github.com/Rav4s/NginX-Config-Files
NginX Website: https://www.nginx.org
Download Ubuntu Server: https://ubuntu.com/download/server
Let’s Encrypt: https://letsencrypt.org/
Certbot: https://certbot.eff.org/
My channel: https://www.youtube.com/channel/UC3T95a3-KMIcSLYbDhdKiTA
My website: https://www.yeetpc.com

Timestamps:

0:00 Intro
0:16 What is a Reverse Proxy?
1:14 Reverse Proxy Software
1:32 Installing NginX
2:05 Removing the default config
2:29 Reverse Proxy Structure
3:27 First Config File
5:55 Second Config File
7:23 SSL Certificates
8:59 Cron Job for SSL
9:19 We’re Done!

Keywords for the algorithm:

“nginx”, “server”, “Linux”, “website”, “proxy”, “reverse proxy”, “SSL”, “Ubuntu”, “https”, “certificates”, “cron”, “config”, “configuration”, “software”, “certbot”, “github”, “IP”, “address”, “servers”, “yeet”, “PC”, “domain”, “domains”, “subdomains”, “multiple”, “setup”, “guide”, “tutorial”, “walkthrough”

source

ip address

Alice AUSTIN

Alice AUSTIN is studying Cisco Systems Engineering. He has passion with both hardware and software and writes articles and reviews for many IT websites.

21 thoughts on “How to Host Multiple Websites on One Public IP Address | Setting up an NginX Reverse Proxy Server

  • Nice job! This really helped me. Keep up the good work!

  • Hey Yeet, would these steps work to host two domains on each their webserver through the same public ip, and when using cloudflare's ssl, I suppose the webserver which hold the reverse proxy configuration file, should be pointing towards this domains content?

    I guess I won't have to make use of the sub-domain section of your guide, so far much gratitude & keep up the good work! You keep it clear & its very easy to follow you.

  • Hi there and thank for this explanation but i am still confuse about where to point the reverse proxy, i have 3 websites use in server block so should i point site2 and site3 reverse proxy to site1? Or should i just leave the default nginx index page as a fake website for main server and putting all 3 sites in their own directory? Thank for any help since i am reading for the past 2 days about this without understanding correctly. Precision: i am not using apache2 server i completely remove it from my server.

  • Wow you are one of the few who can explain something complex in a very simple way! Kudos to you and you got a new subscriber here! I read in another forum that only one ssl can be use for hosting 3 different domains under a vps is that correct?

  • perfect tutorial, now I can solve my issue

  • I can't see my website on my home network, but from the outside it does work. How can I see my website in my house? Great video. Thanks

  • Great video! I know adding a firewall might be outside of the scope of this video, but just telling best practices would be nice.

  • Great presentation. Thank you for sharing. Could this also appply if I had two websites running on two seperate physical servers pointing to another deidicated nginx reverse proxy server? That would make three PC's in all

  • Hi, i really need this video in a specific way, can you explain this process using multiple django websites

  • Phần hướng dẫn sẽ rất khó để làm theo nếu như không biết về ubuntu, thiếu liên kết domain , cách mở và build file thư mục ban đầu, chuyển màn hình nội dung không rõ ràng. Trong khi bạn có thể làm việc mọi thứ bằng dòng lệnh và truy cập vào file để edit bằng cú pháp nano. Phần hướng dẫn khá tệ vì thiếu chi tiết nghiêm trọng.

  • Does the subdomain proxy file go onto the gateway server or in the actual server that hosts the domain. I have several domains on different vm's and one gateway server.

  • Cloudflare automatically gives you website and subdomains a letsencrypt certificate.
    Soo… can you skip the Certbot part if you're using cloudflare?

Comments are closed.