mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-06-14 22:36:09 +08:00
pdc, conditional server name for prod and stg.
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user