Use Cloud Files to serve static content for websites


Pre-reqs

  • A file transfer Application such as FileZilla or Winscp
  • A Text Editor like ConText for Windows and VIM for Linux.
  • Image(s) to display on the website
  • Admin access to a Cloud Sites website or to your web server

Procedure

  • Use one of the several ways to upload content e.g. phspsite2.jpg to Cloud Files as explained in the following:
  1. Uploading content to a container using the Cloud Files user interface
  2. Uploading content to a container using a tool like Fire Uploader

 

  • Note the CDN URL similar to the one shown in the image above
  • Create a sample html page which embeds the image URL, using a text editor. Use the full CDN URL identified in the Cloud Files user interface as shown below.
 
 <html>
  <head>
    <title>Sample Page</title>
  </head>
  <body>
    <p>Image from Cloud Files</p>
    <img src="http://c0344252.cdn.cloudfiles.rackspacecloud.com/phpsite2.img" />
  </body>
 </html>
  
  • Upload the html page to the root content directory of the website. To create a new website in Cloud Sites refer to Adding a new website

 

  • Point the browser to the sample page just created and verify that the image is served. e.g.
    http://www.example.com.php5-7.dfw1-1.websitetestlink.com/index.html 

    . The image is being served from Cloud Files through the Akamai CDN.

 

--RKN - 12/19/2009



Was this content helpful?




© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER