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 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.
Code from video (check part 2 folder):
https://github.com/Cyecize/Shared-Hos...
My new domain router that supports SSL, keep-alive, proxy connections and more:
https://github.com/Cyecize/Domain-Rou...
Part 1:
• Local Shared Hosting (Gateway) App To...
How to properly read HTTP request in Java:
• Read HTTP Request From TCP Socket Str...
Timecodes:
0:00 - Intro
2:18 - Project skeleton overview
6:43 - Coding: Load settings
11:40 - Coding: Server Socket, Thread Pool
14:51 - Coding: Logic for routing
31:27 - Testing
34:08 - Deployment: Docker, maven, exe
36:44 - 1 Year Later, I made a better solution