# Error 404 on media routes in Panel - Nginx server

**URL:** <https://forum.getkirby.com/t/error-404-on-media-routes-in-panel-nginx-server/31206>\
**Category:** Questions\
**Tags:** v4\
**Created:** [March 24, 2024, 6:15pm UTC](https://forum.getkirby.com/t/error-404-on-media-routes-in-panel-nginx-server/31206 "2024-03-24T18:15:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![quentin-f451](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/quentin-f451/32/6730_2.png) [@quentin-f451](https://forum.getkirby.com/u/quentin-f451)\
**Post date:** [March 24, 2024, 6:15pm UTC](https://forum.getkirby.com/t/error-404-on-media-routes-in-panel-nginx-server/31206/1 "2024-03-24T18:15:00Z")

</div>

Hi there,  
I’m having issues with some routes on the Panel as I moved my website from a local Apache server to a remote Nginx server.  
Plugins assets and images give a 404 error and I can’t find how to solve this. Do you have any idea what could be the issue here?

 ![Capture d’écran 2024-03-24 à 19.12.23](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/1/1fc2abe5ded55c1562b235371fcf039b9a2d0a21.png)

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/d/ddb665366f83a73d5dd04b6da777728ffab7fb94.png)

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 24, 2024, 7:37pm UTC](https://forum.getkirby.com/t/error-404-on-media-routes-in-panel-nginx-server/31206/2 "2024-03-24T19:37:58Z")

</div>

> [@quentin-f451](#):
>
> to a remote Nginx server

What does your Nginx config look like, compared to a recommended setup like described here: [Kirby meets Nginx | Kirby CMS](https://getkirby.com/docs/cookbook/development-deployment/nginx)

---

<div class="post-metadata">

**Author:** ![quentin-f451](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/quentin-f451/32/6730_2.png) [@quentin-f451](https://forum.getkirby.com/u/quentin-f451)\
**Post date:** [March 25, 2024, 5:22am UTC](https://forum.getkirby.com/t/error-404-on-media-routes-in-panel-nginx-server/31206/3 "2024-03-25T05:22:47Z")

</div>

This is what the nginx config looks like (I’m not handling the server myself, I’m not sure why it looks like that exactly):

```auto
server {
    listen 80 proxy_protocol;
    listen [::]:80 proxy_protocol;
    server_name localhost;
    root /.../.../public;

    index index.html index.htm index.php;

    set_real_ip_from 192.168.3.11;
    set_real_ip_from 192.168.3.12;
    real_ip_header proxy_protocol;
    real_ip_recursive on;

    rewrite ^\/(content|site|kirby)/(.*)$ /error last;

    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Proxy "";
        proxy_pass_header Server;

        try_files $fastcgi_script_name =404;

        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS on;

        fastcgi_param front_controller_active true; # Enable pretty urls

        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;

        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php8.1.sock;
        fastcgi_index index.php;
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
        expires max;
        log_not_found off;
    }
}

```

---

<div class="post-metadata">

**Author:** ![chriscorby](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/chriscorby/32/16459_2.png) [@chriscorby](https://forum.getkirby.com/u/chriscorby)\
**Post date:** [July 7, 2025, 11:48am UTC](https://forum.getkirby.com/t/error-404-on-media-routes-in-panel-nginx-server/31206/4 "2025-07-07T11:48:07Z")

</div>

@quentin-f451 – did you ever get to the bottom of this one?

I think I’m facing something similar here: [Plugin Assets 404 Debugging](https://forum.getkirby.com/t/plugin-assets-404-debugging/34374)

Cheers,

Chris
