Note: This article has the reference to the issue with the fix available:
-
#PPPM-9862 “Unable to show additional nginx directives in CLI (as PPP-40001)”
Fixed in:- Plesk Obsidian Release Candidate 1.0 04 June 2019
Question
How to get and set Additional Apache/Nginx directives via CLI?
Answer
For Apache Additional Settings (HTTP only)
In order to get current Apache Additional Settings for a domain:
- Connect to the server via SSH
- Run the following command:
# plesk bin domain –show-web-server-settings example.com | grep -A 10 “[additional settings]”
To set them, edit the following files, since they have the content of Additional Directives set in Plesk UI:
/var/www/vhosts/system/example.com/conf/vhost.conf
/var/www/vhosts/system/example.com/conf/vhost_ssl.conf
For Nginx
Currently, there is no way to get Additional Nginx directives over CLI. The following request was created PPPM-9862, which will be implemented in one of the future product updates.
To edit Additional Nginx directives:
-
Connect to the server via SSH
-
Open
/var/www/vhosts/system/example.com/conf/vhost_nginx.conf
with a text editor.