| 67 | Media (pictures etc.) are not served from the application servers. Instead this content is served from a media server. The application is configured to write all uploaded media (uploaded through the admin interface that is) to the media-server. When rendering pages that contain these media files the url is changed to point to the public part of the media server. |
| 68 | |
| 69 | The django plugin that is used to create this behaviour is called django-resto (see https://django-resto.readthedocs.org/en/latest/) |
| 70 | |
| 71 | In the config file the following settings are important: |
| 72 | |
| 73 | [[IncludeSource(website/trunk/website/conf/production/settings_live.py,start=65,end=67)]] |
| 74 | |
| 75 | The '''RESTO_MEDIA_HOSTS''' is an array of media servers that need to hold the data. |
| 76 | |
| 77 | the '''MEDIA_URL''' setting is prepended to the rendered locations of media-files. This needs to be a publicly available address. |
| 78 | |
| 79 | = dex-content1 = |
| 80 | |
| 81 | == NGINX == |
| 82 | |
| 83 | |