This media provider is for simple single-server installations where an
HTTP server running on the same machine handles serving of the static
media files.
An appropriate setup with nginx is now the default in the new install
script.
This is primarily to show how to set up reddit with HTTPS as well as to
make it possible to test HTTPS content. The default installation uses
the snakeoil cert and is therefore unauthenticated. A properly signed
certificate must be used for actual security.
Previously, c.secure status was determined based on the domain used.
This allows for the status to vary independently of domain for greater
flexibility.
Note: it is critical that the load balancer strips any X-Forwarded-Proto
headers that may've been sent by the client.
cloudsearch_q and scraper_q rely on external services (Amazon
CloudSearch and embed.ly respectively) that must be configured manually
before they will run properly. To avoid a spew of useless error messages
after installation, we'll just set the consumer counts to zero.
template0 is the base template that should be immutable, while template1
is the site-customized version. PostgreSQL defaults to using template1
when doing CREATE DATABASE. Unfortunately, in some situations, template1
will have an encoding set that makes it impossible for us to CREATE
the reddit database with UTF-8 encoding.
Automated runs of the installer need to be able to configure the
domain ahead of time to ensure that the site will come up in a valid
state. The install script will now check for an environment variable,
REDDIT_DOMAIN, and use that value if it is present. If not present,
it will default to the previous "reddit.local".
The reddit PPA version of Cassandra no longer auto-starts on install
because that was really obnoxious in production. We'll have to make
sure to start the service after installing it.