Question
How to get and set Additional Apache/Nginx directives via CLI?
Answer
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
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.
Comments
0 comments
Please sign in to leave a comment.