• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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