• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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