title: Serve Static files from Google Cloud Storage Bucket (for Django App hosted on GCE)
body: <p>I'm trying to serve the static Files for my django App from Cloud Storage Bucket but don't know the exact process. Can someone please suggest a proper way to do so ?</p>
  <p>Steps I did:</p>
  <ol>
  <li>Uploaded all the static files on Google Cloud Storage Bucket(<a href="http://www.example.com" rel="nofollow noreferrer">www.example.com</a>) using gsutil command.</li>
  <li>Edited <code>/etc/apache2/sites-available/default-ssl.conf</code> File.</li>
  </ol>
  <p>File Content:</p>
  <pre><code>&lt;VirtualHost *:443&gt;
          ServerName example.com
          ServerAdmin admin@example.com
  
   #       Alias /static /opt/projects/example-google/example_static
          Alias /static https://storage.googleapis.com/www.example.com/static
          &lt;Directory /opt/projects/example-google/example_static&gt;
             Require all granted
          &lt;/Directory&gt;
  
          &lt;Directory /opt/projects/example-google/example/example&gt;
              &lt;Files wsgi.py&gt;
                  Require all granted
              &lt;/Files&gt;
          &lt;/Directory&gt;
  
          WSGIDaemonProcess example python-path=/opt/projects/example-google/example:/opt/projects/example-google/venv/lib/python2.7/site-packages
          WSGIProcessGroup example
  WSGIApplicationGroup %{GLOBAL}
          WSGIScriptAlias / /opt/projects/example-google/example/example/wsgi.py
  
          SSLEngine on
          SSLCertificateFile  /etc/apache2/ssl/example.com.crt
          SSLCertificateKeyFile /etc/apache2/ssl/example.com.key
          SSLCertificateChainFile /etc/apache2/ssl/intermediate.crt
  &lt;/VirtualHost&gt;
  </code></pre>
  <p>settings.py File:</p>
  <pre><code># Static files (CSS, JavaScript, Images)
  STATIC_URL = '/static/'
  # STATIC_URL = 'https://storage.googleapis.com/www.example.com/static/'
  STATIC_ROOT = os.path.join(BASE_DIR, '../example_static')
  
  MEDIA_URL = '/media/'
  MEDIA_ROOT = os.path.join(BASE_DIR, '../example_media')
  STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'), MEDIA_ROOT,)
  </code></pre>
  <p>Any suggestion on what all additional changes are required for this task ?</p>
  <p>Thanks,</p>