Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to update web server settings via CLI for all domains on Plesk for Linux server?

 
apacheclidomainsextensionslinux

Question

How to update web server settings via CLI for all domains on a Plesk for Linux server?

Answer

  1. Connect to the server using SSH.

  2. Execute one of the commands depending on which setting should be changed:

    • To enable serving PHP by nginx:

      # plesk bin site -l | while read i; do plesk bin subscription --update-web-server-settings $i -nginx-serve-php true; done

    • To disable the option Domains > example.com > Apache & nginx Settings > Smart static files processing on all domains:

      # plesk bin site -l | while read i; do plesk bin domain --update-web-server-settings $i -nginx-transparent-mode true; done

    • To enable the options Domains > example.com > Apache & nginx Settings > Serve static files directly by nginx on all domains:

      # plesk bin site -l | while read i; do plesk bin domain --update-web-server-settings $i -nginx-serve-static true; done

    Other settings can be updated by substituting the setting name (after --update-web-server-settings $i) in the commands above.

    Available settings

    • -apache-directory-index <directory index> - Set index pages for the specified website. For example: index.html index.htm index.text

    • -apache-restrict-follow-sym-links true|false - Restrict the ability to follow symbolic links.

    • -nginx-proxy-mode <true|false> - Proxy mode

    • -nginx-transparent-mode <true|false> - Smart static files processing

    • -nginx-serve-static <true|false> - Serve static files directly by nginx

    • -nginx-static-extensions <extensions> - Sets static files extensions that should be served directly by nginx. If empty value is specified, the static files extensions from the default nginx configuration (/var/www/vhosts/example.com/system/conf/last_nginx.conf) will be used. Use this option with the -nginx-serve-static command.

    • -nginx-serve-php <true|false> - Turns on/off processing PHP files by the nginx reverse proxy server. The default value is "false".

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Check Open Ports in Linux (Simple Commands & Tools)

Read More »

Linux Logs Explained

Read More »

Your Complete .htaccess Guide: Including .htaccess Basics and More

Read More »
Knowledge Base

How to install the php-mcrypt module on a Plesk server

Read More »

How to configure redirect from Web Server’s Default Page or existing domains to the Plesk login page on port 8443 on Plesk for Linux?

Read More »

[BUG] nginx shows configuration error in Plesk: “proxy_read_timeout” directive is duplicate

Read More »

How to disable Apache and nginx log files for domains on Plesk for Linux server?

Read More »

Hosting Wiki

  • CLI
  • Server Redundancy
  • Linux Containers
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • Domain
  • Plesk
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family