diff --git a/inventory/group_vars/qa-stg b/inventory/group_vars/qa-stg index 5f80116cd7..c59919f1c6 100644 --- a/inventory/group_vars/qa-stg +++ b/inventory/group_vars/qa-stg @@ -15,11 +15,12 @@ extra_enablerepos: 'infrastructure-testing' sshd_config: ssh/sshd_config.qa-stg sshd_port: 222 -external_hostname: qadevel-stg.cloud.fedoraproject.org +external_hostname: qa.stg.fedoraproject.org -sslcertfile: qa-stg.qa.fedoraproject.org.cert -sslkeyfile: qa-stg.qa.fedoraproject.org.key -sslintermediatecertfile: '' +# not needed with new setup +#sslcertfile: qa-stg.qa.fedoraproject.org.cert +#sslkeyfile: qa-stg.qa.fedoraproject.org.key +#sslintermediatecertfile: '' mariadb_host: localhost mariadb_config: my.cnf.phabricator diff --git a/roles/phabricator/tasks/main.yml b/roles/phabricator/tasks/main.yml index 8a41de01f3..a2ab80ed5f 100644 --- a/roles/phabricator/tasks/main.yml +++ b/roles/phabricator/tasks/main.yml @@ -173,6 +173,7 @@ owner: root group: root mode: 0600 + when: deployment_type == 'qadevel-prod' - name: Install the SSL key copy: @@ -181,6 +182,7 @@ owner: root group: root mode: 0600 + when: deployment_type == 'qadevel-prod' - name: Install the SSL intermediate cert copy: @@ -189,7 +191,7 @@ owner: root group: root mode: 0600 - when: sslintermediatecertfile != '' + when: sslintermediatecertfile != '' and deployment_type == 'qadevel-prod' - name: copy phabricator httpd config diff --git a/roles/phabricator/templates/local.json.j2 b/roles/phabricator/templates/local.json.j2 index 48809e7df1..a4c3dbd7fd 100644 --- a/roles/phabricator/templates/local.json.j2 +++ b/roles/phabricator/templates/local.json.j2 @@ -1,5 +1,6 @@ { "phabricator.base-uri" : "https:\/\/phab.{{ external_hostname }}\/", + "phabricator.allowed-uris": ["http:\/\/phab.{{ inventory_hostname }}\/"], "log.ssh.path" : "\/var\/log\/phabricator\/ssh.log", "log.access.path" : "\/var\/log\/phabricator\/access.log", "mysql.host" : "{{ mariadb_host }}", diff --git a/roles/phabricator/templates/phabricator.conf.j2 b/roles/phabricator/templates/phabricator.conf.j2 index c3cf2612a9..8db09e0659 100644 --- a/roles/phabricator/templates/phabricator.conf.j2 +++ b/roles/phabricator/templates/phabricator.conf.j2 @@ -1,3 +1,4 @@ +{% if deployment_type == "qadevel-prod" %} # Change this to the domain which points to your host. ServerName phab.{{external_hostname}} @@ -75,7 +76,21 @@ RewriteEngine on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] +{% if deployment_type == "qadevel-prod" %} +{% else %} + + # Change this to the domain which points to your host. + ServerName phab.{{external_hostname}} + # Make sure you include "/webroot" at the end! + DocumentRoot {{phabroot}}/phabricator/webroot + + RewriteEngine on + RewriteRule ^/rsrc/(.*) - [L,QSA] + RewriteRule ^/favicon.ico - [L,QSA] + RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA] + +{% endif %} AllowOverride None