Setting up a Reverse Proxy for Divio vanity media domains on

Why is this desirable? uses Amazon AWS S3 for storing media files. For PDF downloads and images it would be great if those would appear to be hosted on the website’s domain or on a subdomain, due to trust and SEO reasons. Here is an example: should become if your website runs on The following article describes how to achieve that.

There is some official documentation available at – follow those steps.

You have to create a separate Divio project for the reverse proxy. You can fork or copy the below sample project and then add it to your Divio project as external repository:

You can get the Divio DSN for the S3 storage by logging into your website project via SSH and then execute echo $DEFAULT_STORAGE_DSN , then take that value to update the nginx configs in /nginx.

Then you can deploy the solution to see if it works. Don’t forget to set / update the DEFAULT_STORAGE_DSN env variable in the divio control for your main project.

Example DSN value: s3://