AnoopSharma Yes, I suspect this is the case.
location / { try_files $uri $uri/ /index.php?$query_string; }
location /api { try_files $uri $uri/ /api.php?$query_string; }
location /admin { try_files $uri $uri/ /admin.php?$query_string; }
It depends on what your web root is (for example, the first page that loads a website, is it /home/ubuntu/site or /home/ubuntu/site/blog or /home/ubuntu/site/blog/forum3?).
We'll need to use that relative path starting at the / after those three location entries, and after the $uri/ entries in those same lines.
So, figure out the web root above, and then try something like this:
location /blog/forum3/public { try_files $uri $uri/ blog/forum3/public/index.php?$query_string; }
location /blog/forum3/public/api { try_files $uri $uri/ blog/forum3/public/api.php?$query_string; }
location /blog/forum3/public/admin { try_files $uri $uri/ blog/forum3/public/admin.php?$query_string; }