Local Shared Hosting (Gateway) App To Have Multiple Domains Share One IP | Part 1 - Spring Cloud

Опубликовано: 10 Май 2025
на канале: Cyecize
211
7

Hosting multiple websites for free with different domains on your own PC is easily done with this simple app, serving as a proxy between all of your websites and the public.
Workflow:
This Gateway API app is listening on the default HTTP port 80.
Once a request is received, it is processed and based on the provided "Host" header, the request is redirected to one of the web apps based on your configuration.
You DO NOT NEED java or JDK to run this application if you have docker installed.

This application is written in Java (Spring), but it will work perfectly for any sort of web app (eg. PHP, Python, Java, etc...)
The only drawback is that the request is fully processed by the gateway app, which leads to some problems processing requests with multipart data.
Stay tuned for Part 2 where I will show you how to create a Gateway API from scratch.

Link to Repo:
https://github.com/Cyecize/Shared-Hos...

Timecodes:
0:00 - Intro
0:28 - The goal of the project
1:45 - Set-Up (Mock) three domains
3:12 - Create the project (Spring Initializr)
4:44 - Configuration For Spring Cloud Gateway
6:18 - How does Shared Hosting work? (Generally)
7:30 - Testing - It Works First Try!
8:45 - Deployment using Jar file
10:06 - Deployment using Docker
11:25 - Drawbacks, Part 2, Outro