• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved Part of nginx config file is being overridden somewhere

KurtLowe

New Pleskian
Server operating system version
Ubuntu 24.04.1
Plesk version and microupdate number
18.0.64
Hi All,

I have been making some additions to my nginx config file in order to redirect users from domain.com/pages/example.php to domain.com/example. I was stuck on it for a while, with the location block not seeming to be matched unless I used an equal sign for exact matching. After commenting out the rest of my config, it was still being overridden somewhere. I adjusted to to just return a 403 to make it easier to test.

location /pages/example.php {
return 403;
}

My nginx config file now only consists of this, but is somehow being overridden. Surely something on plesk is causing this, any ideas?
 
Hi,

You need a regex match on the location. Your location directive will not work in a Plesk environment because you have a "location /" earlier in the server block.

Try:
Code:
location ^~ /pages/example.php {
return 403;
}

 
Hi,

You need a regex match on the location. Your location directive will not work in a Plesk environment because you have a "location /" earlier in the server block.

Try:
Code:
location ^~ /pages/example.php {
return 403;
}

This has worked, thank you! Didn't know this was needed when writing in a plesk environment
 
Back
Top