Project

Profile

Help

Issue #6128

closed

ansible-pulp misconfigures static directory for nginx and apache

Added by dkliban@redhat.com about 4 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
Installer - Moved to GitHub issues
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 69
Quarter:

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

Actions #1

Updated by fao89 about 4 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 66
Actions #2

Updated by rchan about 4 years ago

  • Sprint changed from Sprint 66 to Sprint 67
Actions #3

Updated by rchan about 4 years ago

  • Sprint changed from Sprint 67 to Sprint 68
Actions #4

Updated by fao89 about 4 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to fao89

Added by Fabricio Aguiar about 4 years ago

Revision 7c631232 | View on GitHub

Changing STATIC_URL

https://pulp.plan.io/issues/6128 ref #6128

Actions #6

Updated by rchan about 4 years ago

  • Sprint changed from Sprint 68 to Sprint 69

Added by Fabricio Aguiar about 4 years ago

Revision dbbfc4c9 | View on GitHub

Making nginx/apache points to django.STATIC_ROOT

https://pulp.plan.io/issues/6128 closes #6128

Added by Fabricio Aguiar about 4 years ago

Revision dbbfc4c9 | View on GitHub

Making nginx/apache points to django.STATIC_ROOT

https://pulp.plan.io/issues/6128 closes #6128

Actions #7

Updated by Anonymous about 4 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by Anonymous about 4 years ago

Actions #9

Updated by ttereshc about 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Sprint/Milestone set to 3.3.0
Actions #10

Updated by bmbouter almost 4 years ago

  • Category set to Installer - Moved to GitHub issues
  • Tags deleted (Pulp 3 installer)

Also available in: Atom PDF