Cant get wordpress to work on subdirectory

so @funkysoul was kind of right in terms on installing php.

It was still a nightmare to setup nginx the way i needed it, my solution is:

  location / {
    try_files $uri $uri/ =404;
  }

  location ^~ /blog {
    alias /srv/www/wordpress;

    try_files $uri $uri/ /index.php?/$1 last;

    location ~ \.php$ {
      index index.php;

      include snippets/fastcgi-php.conf;
      fastcgi_param SCRIPT_FILENAME $request_filename;
      fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    }
  }

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
  }

this finally works, as in returns files under “/” with one root and returns wordpress php files under “/blog” with different root