Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to serve static files on Google Cloud Storage with Google App Engine with one domain?

First, Build a site www.example.com with Google App Engine https://cloud.google.com/products/

Second, Upload a static image example.jpg to Google Cloud Storage https://cloud.google.com/products/cloud-storage aka https://developers.google.com/storage/

Is it possibe to serve the example.jpg as http://www.example.com/images/example.jpg? instead of using a subdomain such as images.example.com or cdn.example.com etc

The reason I want to do this is because I want to make it easier to move my site to a VPS when necessary.

like image 423
Gaby Solis Avatar asked Jul 08 '13 22:07

Gaby Solis


1 Answers

I don't believe so, no. A single domain name must route to either Google Cloud Storage or Google App Engine.

You could cheat, mind you. You could configure your app engine app to take all requests for, say "/images/X" and redirect them to images.example.com/X, or you could have your app read the data from GCS and feed it back to the user directly from app engine, but neither of those are a good solution.

If you wanted to move to a VPS later, you could perhaps configure the VPS to handle two domains, one for images and one for dynamic content.

like image 120
Brandon Yarbrough Avatar answered Nov 15 '22 09:11

Brandon Yarbrough