• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Issue how to do simple nginx rewrite

larryk

Regular Pleskian
So I'm not sure where the issue is

situation, on this url:

domain.com/team/the-bears/

it gives: File not found. (on the browser)
in the errror logs: nginx access error 404 and
- 5977#0: *44518 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream


the apache & nginx settings page, under
Additional nginx directives

i've tried all these... all same result
location /team/ {
#rewrite $uri index.php?vTeam=$1&vDept=$2;
# rewrite $uri team/index.php?vTeam=$1&vDept=$2;
# rewrite $uri /team/index.php?vTeam=$1&vDept=$2;
rewrite $uri google.com;
# rewrite ^/(.*)/(.*)/ /team/index.php?vTeam=$1&vDept=$2;
# try_files $uri /team/index.php?vTeam=$1&vDept=$2;
}



as you can tell, i'm new at nginx or don't have a clue what I'm doing...
but I'm pretty sure that nginx is NOT EVEN getting to the location directive?
that is why it says file not found?

note: i do have this file: domain.com/team/index.php

so my question --- how can i get the team/index.php to execute, when I the url is domain.com/param1/pararm2/ ????

thanks

ps. using FPM application served by nginx
plesk 12.5

anything else you need me to add?
 
Back
Top