rockdrilla

sample nginx config with Google Drive as CDN

Nov 15th, 2013
480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # open https://drive.google.com in your browser
  2. # navigate into your public folder (make sure that it has sharing mode 'Public on the web')
  3. # folder's hash is located in URL: https://drive.google.com/#folders/{MAGIC_HASH}
  4. # read more: https://developers.google.com/drive/publish-site
  5. server {
  6. listen 80;
  7. server_name domain.com;
  8. root /var/www/htdocs/domain.com;
  9.  
  10. try_files $uri $uri/ @go_google;
  11.  
  12. location @go_google {
  13. return 301 https://googledrive.com/host/{MAGIC_HASH}$request_uri;
  14. }
  15. }
Add Comment
Please, Sign In to add comment