• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Detecting webspace in nginx directive

Miguel Nunes

New Pleskian
Is it possible to detect the current directive when using custom nginx directives in Plesk?

This is what I'm trying to do:
Code:
error_page 400 401 403 404 405 406 407 412 414 415 500 501 502 /custom_error_$status.html;
location ~ ^/custom_error_[0-9]+.html$ {
    root /var/www/vhosts/WEBSPACE_NAME/error_docs;
}

Right now I have to change WEBSPACE_NAME to the name of each Webspace. I'd like to know if there is or can be a variable that holds the webspace name or path of the open website.
 
Back
Top