retrace: always use correct path in hub.wsgi

This commit is contained in:
Miroslav Suchý 2017-04-06 15:23:05 +02:00
parent 679ab41ee8
commit d9a359e446
3 changed files with 9 additions and 12 deletions

View file

@ -1,14 +1,6 @@
# check web functionality # check web functionality
# #
- set_fact:
url_suffix: ""
when: faf_web_on_root
- set_fact:
url_suffix: "/faf"
when: not faf_web_on_root
- set_fact: - set_fact:
main_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}" main_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}"
problems_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}/problems/" problems_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}/problems/"

View file

@ -16,11 +16,16 @@
notify: notify:
- restart httpd - restart httpd
# faf installs this file by itself if faf_web_on_root - set_fact:
# is disabled and is available under <hosts>/faf url_suffix: ""
when: faf_web_on_root
- set_fact:
url_suffix: "/faf"
when: not faf_web_on_root
- name: put webfaf on root (/) if configured - name: put webfaf on root (/) if configured
template: src=etc-httpd-conf.d-faf-web.conf.j2 template: src=etc-httpd-conf.d-faf-web.conf.j2
dest=/etc/httpd/conf.d/faf-web.conf dest=/etc/httpd/conf.d/faf-web.conf
when: faf_web_on_root
notify: notify:
- restart httpd - restart httpd

View file

@ -10,7 +10,7 @@ WSGIDaemonProcess faf user=faf group=faf processes=3 threads=5
{% set python = 'python2.7' %} {% set python = 'python2.7' %}
{% endif %} {% endif %}
WSGIScriptAlias / /usr/lib/{{ python }}/site-packages/webfaf/hub.wsgi process-group=faf application-group=%{GLOBAL} WSGIScriptAlias {{ url_suffix }} /usr/lib/{{ python }}/site-packages/webfaf/hub.wsgi process-group=faf application-group=%{GLOBAL}
<Location /> <Location />
<IfModule mod_authz_core.c> <IfModule mod_authz_core.c>