pdc, conditional server name for prod and stg.
This commit is contained in:
parent
ec3fef5508
commit
156662e5e2
2 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue