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
Updated by fao89 almost 5 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 66
Updated by fao89 over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to fao89
Added by Fabricio Aguiar over 4 years ago
Updated by fao89 over 4 years ago
- Status changed from ASSIGNED to POST
Added by Fabricio Aguiar over 4 years ago
Revision dbbfc4c9 | View on GitHub
Making nginx/apache points to django.STATIC_ROOT
Added by Fabricio Aguiar over 4 years ago
Revision dbbfc4c9 | View on GitHub
Making nginx/apache points to django.STATIC_ROOT
Updated by Anonymous over 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset ansible-pulp|dbbfc4c96558cd1dc80f74feb20840abf6e21b72.
Updated by Anonymous over 4 years ago
Applied in changeset ansible-pulp3|dbbfc4c96558cd1dc80f74feb20840abf6e21b72.
Updated by ttereshc over 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
- Sprint/Milestone set to 3.3.0
Updated by bmbouter over 4 years ago
- Category set to Installer - Moved to GitHub issues
- Tags deleted (
Pulp 3 installer)
Changing STATIC_URL
https://pulp.plan.io/issues/6128 ref #6128