0
votes

Good morning, I am moving my PHP + Apache application from Compute Engine VM to Google Cloud Run, I managed to get the Cloud Run service up and running and somewhat working, but I want it to be avaible at www.mydomainexample.com.br/app/something, when I set the Load Balancer to do "https://www.mydomainexample.com.br/app/something/* -> Cloud Run service", it hits Apache running on my Cloud Run service, just as expected, but it returns 404 because the load balancer requests "/app/something/" from Apache, which doesn't exist since I want the load balancer to just send the users from that URL + path to the start page of my application that's running on Apache, that should be my base URL.

So I need to know which Google Cloud Platform solution or Apache conf directive would be ideal to do what I want. Apache's "Alias" didn't work and I was never sure if it was really the right, clever and beautier way to go.

1

1 Answers

1
votes

You can perform path rewrite with HTTPS load balancer.

  • In the host and path rules, click on advanced
  • set the default rules (any path, any domain) and then add new host and path rules
  • From there add a path rules

enter image description here

  • And configure it like this

enter image description here