Static files not loading on Multisite WordPress in NGINX

I have installed multisite in a subdirectory of the main WordPress for a single domain.

However, the WordPress sites are loading perfectly including the inner pages, except the multisite that is installed as a subdirectory.

I am modifying NGINX configuration through trellis > nginx-includes > domain_name > prefixes.conf.j2

All static files are not found (404), I can’t access their WP Dashboard as well. The request from the network seems fine.

{% set sites = [
    'site1',
    'site2',
    'site3',
    'multisite'
] %}

{% set multisites = [
    'multisite1',
    'multisite2',
    'multisite3',
] %}


{% for site in sites %}
    location /{{ site }} {
        try_files $uri $uri/ /{{ site }}/index.php?$args;
    }
{% endfor %}

{% for site in multisites %}
    location /multisite/{{ site }} {
        try_files $uri $uri/ /multisite/index.php?$args;
    }
{% endfor %}

Any from the trellis team that can respond? I am not able to find a solution to this one.

This topic was automatically closed after 42 days. New replies are no longer allowed.