Currently we have below requirement:
Each user can have their own subdomain and folder under the Google Storage Bucket with content that should be served via this subdomain, for example:
[domain] user1.example.com -> [bucket] example.com/user1/index.html
[domain] user2.example.com -> [bucket] example.com/user2/index.html
So bucket having below structure:
- [Bucket] example.com
- [Folder] user1
- [File] Index.html
- [Folder] user2
- [File] Index.html
- etc..
Subdomains will be added dynamically and I can't just set Map Rules (can update it via API, but I guess they have limits for Map Rules).
Also those HTML content should be served via HTTPS.
I have setup domain, storage bucket, load balancer on GCP but currently stuck with URL/Path rewriting on LoadBalancer.
So the question - is it possible to make a call to the "user1.example.com" and via Load Balancer serve HTML connect from the bucket "/example.com/user1" folder?
Is it possible to make it work with above architecture or it will require individual buckets for each user or it will only work with separated Reverse Proxy that will redirect the trafic to specific folder/domain?
Thanks.