nginx has incorrect path for machine-resources in Debian package

Bug #1843919 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Newell Jensen

Bug Description

I just tried to commission a machine using MAAS installed with the Debian packages can it failed because MAAS configured nginx to share the machine-resources using the nginx path.

upstream maas-regions {
    server 10.0.0.2:5240;
}

server {
    listen [::]:5248;
    listen 5248;

    location /MAAS/ {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Host $host:$server_port;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        proxy_buffering off;
        proxy_pass http://maas-regions/MAAS/;
    }

    location /machine-resources/ {
 root /snap/maas/current/usr/share/maas;
 autoindex on;
 gzip on;
    }

    location /images/ {
        auth_request /log;

        alias /var/lib/maas/boot-resources/current/;
        autoindex on;
    }

    location = /log {
        internal;
        proxy_pass http://localhost:5249/log;
        proxy_set_header X-Original-URI $request_uri;
        proxy_set_header X-Original-Remote-IP $remote_addr;
    }

    location / {
        proxy_pass http://localhost:5249/boot/;
        proxy_buffering off;
        proxy_set_header X-Server-Addr $server_addr;
        proxy_set_header X-Server-Port $server_port;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Port $remote_port;
    }
}

Related branches

Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
status: Triaged → In Progress
Changed in maas:
milestone: none → next
status: In Progress → Fix Committed
Alberto Donato (ack)
Changed in maas:
milestone: next → 2.7.0alpha1
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.