pdc, conditional server name for prod and stg.

This commit is contained in:
Ralph Bean 2016-01-25 16:47:43 +00:00
parent ec3fef5508
commit 156662e5e2
2 changed files with 10 additions and 0 deletions

View file

@ -11,7 +11,12 @@ WSGIScriptAlias / /usr/lib/python2.7/site-packages/pdc/wsgi.py
<VirtualHost *:80>
{% if env == 'staging' %}
ServerName https://pdc.stg.fedoraproject.org
{% else %}
ServerName https://pdc.fedoraproject.org
{% endif %}
UseCanonicalName on
RewriteEngine on

View file

@ -67,6 +67,11 @@ DEBUG = False
# NOTE: this is needed when DEGUB is False.
# https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
{% if env == 'staging' %}
'pdc.stg.fedoraproject.org',
{% else %}
'pdc.fedoraproject.org',
{% endif %}
'{{ inventory_hostname }}',
'{{ inventory_hostname_short }}',
'localhost',