Cobra Forum

Plesk Panel => Webserver => Topic started by: Suhitha on Mar 11, 2026, 06:24 AM

Title: How to get and set Additional Apache/Nginx directives via CLI?
Post by: Suhitha on Mar 11, 2026, 06:24 AM
Applicable to:



Question

How to get and set Additional Apache/Nginx directives via CLI?


Answer

                                                Get directives

1.Connect to the server via SSH

2.Run the following command:

# plesk bin domain --show-web-server-settings example.com


                                                  Set directives
1.Connect to the server via SSH

2.Using a preferred editor(for example, vi), insert or remove the directives in the following files:
Apache2(HTTP): /var/www/vhosts/system/example.com/conf/vhost.conf

Apache2(HTTPS): /var/www/vhosts/system/example.com/conf/vhost_ssl.conf

Nginx: /var/www/vhosts/system/example.com/conf/vhost_nginx.conf