Maintenance: Planio will be observing a scheduled maintenance window this Sunday, November 10, 2024 from 20:00 UTC until 21:00 UTC to perform important network maintenance in our primary data center. Your Planio account will be unavailable for a few minutes during this maintenance window.
Issue #6128
closedansible-pulp misconfigures static directory for nginx and apache
Description
The request below is possible because nginx and apache are configured to serve the 'pulp_webserver_static_dir' at the root[0, 1]. However, the value of this variable is set to {{ pulp_install_dir }}/site-packages/rest_framework[2, 3].
The pulp_webserver_static_dir should always be /var/lib/pulp/assets/. nginx and apache should be configured to serve it at /static/.
$ http http://localhost/apps.py HTTP/1.1 200 OK Accept-Ranges: bytes Connection: Keep-Alive Content-Length: 255 Date: Tue, 11 Feb 2020 15:18:19 GMT ETag: "ff-59638f8639473" Keep-Alive: timeout=5, max=10000 Last-Modified: Thu, 31 Oct 2019 18:25:13 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_wsgi/3.4 Python/2.7.5 from django.apps import AppConfig class RestFrameworkConfig(AppConfig): name = 'rest_framework' verbose_name = "Django REST framework" def ready(self): # Add System checks from .checks import pagination_system_check # NOQA
[0] https://github.com/pulp/ansible-pulp/blob/94ca14444ad18ff02db26dce2033010ca68e00e1/roles/pulp-webserver/templates/nginx.conf.j2#L43 [1] https://github.com/pulp/ansible-pulp/blob/94ca14444ad18ff02db26dce2033010ca68e00e1/roles/pulp-webserver/templates/pulp-vhost.conf.j2#L5 [2] https://github.com/pulp/ansible-pulp/blob/94ca14444ad18ff02db26dce2033010ca68e00e1/roles/pulp-webserver/tasks/nginx.yml#L24 [3] https://github.com/pulp/ansible-pulp/blob/94ca14444ad18ff02db26dce2033010ca68e00e1/roles/pulp-webserver/tasks/apache.yml#L16
Changing STATIC_URL
https://pulp.plan.io/issues/6128 ref #6128