0

I am looking at using either OpenShift or Heroku for my Bottle-built API and HTML+JavaScript+CSS frontends.

Deploying my custom API is straightforward, and I can trivially route my static files through the API.

There are many advantages to serving static files through a web-server (nginx, apache etc.) instead.

How do I do this on OpenShift or heroku?

A T
  • 13,008
  • 21
  • 97
  • 158

1 Answers1

0

OpenShift

RewriteEngine On
RewriteRule ^application/media/(.+)$ /static/media/$1 [L]

Then copy the media/* content to yourapp/wsgi/static/media/ and it should just work.

Note: The ^application/ part of the URI match is required.

Reference: https://github.com/openshift-quickstart/bottle-openshift-quickstart

Community
  • 1
  • 1
A T
  • 13,008
  • 21
  • 97
  • 158