My aim is this
- Host multiple websites/apps on IIS that is configured on my windows server instance on Google cloud e.g example.com (to host the website), api.example.com (to host api endpoints), app.example.com (to host the web app). The parent domain example.com is configured on godaddy and currently points to a static ip. I've set up the subdomains (api.example.com, app.example.com) and i need to point them to separate ips.
- Have each website use attached to individual static IPS already reserved
- Requests are routed to the exact app it is meant for based on the ip addressing
What I've done
- Created a windows server 2012 instance on google cloud
- Attached a static ip to the instance and currently have one website pointing to that static ip
- Reserved extra static ip and attempted to attach to the existing instance
Challenges
Google cloud won't allow me attach an ip to an existing intance that already has an ip (fair enough). so I thought it would make sense creating multiple network interfaces and attach separate IP to them. However google cloud docs says 1. You can only configure a network interface when you create an instance. - I really do not have the luxury of recreating this instance 2. You cannot attach multiple network interfaces to the same VPC network. - I do not have needs for multiple vpc network. I'm trying to have IIS as a web server hosting multiple applications that can each be reached via its own IP
I also attempted IP Forwarding rules but it turns out It can only be toggled on creation and since I have a running instance with IP forwarding turned off, I would have to recreate the instance to fit my needs.
Is there a way out for me? what do I have to do?