Crear una suscripción de Plesk desde ssh: Todos los comandos y opciones

Curso Avanzado Plesk

Curso Avanzado Plesk

Bienvenidos a VerTutoriales.com. Como todo buen administrador de sistemas seguramente sabrás moverte a base de comandos por SSH, al menos si trabajas en entornos linux, y si además trabajas con Plesk para administrar tu servidor web o de correo, es más que posible que necesites automatizar algunas tareas. Es por ello que vamos a exponer en este artículo todos los comandos que devuelve el subscription de Plesk

Sin más preámbulos, paso a pegar todos los parámetros que nos muestra la ayuda de subscription de plesk para utilizar desde ssh:

subscription –help

Usage: subscription command <subscription_name> [options]
Available commands:
–create or -c <subscription_name> Creates a subscription.
–update or -u <subscription_name> Updates an existing subscription.
–remove or -r <subscription_name> Removes an existing subscription.
–info or -i <subscription_name> Retrieves information on a
subscription.
–suspend <subscription_name> Suspends the domain.
–webspace-on <subscription_name> Activates a whole subscription.
–webspace-off <subscription_name> Suspends a whole subscription.
–lock-subscription <subscription_name>
Locks the subscription for syncing,
the subscription properties will not
change when an associated plan is
modified.
–unlock-subscription <subscription_name>
Unlocks the subscription and enables
synchronization with the associated
service plans.
–no-subscription <subscription_name>
Unbinds the subscription from the
associated service plans and makes it
custom.
–switch-subscription <subscription_name>
Associates the subscription with the
specified hosting plan.
–sync-subscription <subscription_name>
Synchronizes a subscription with the
associated plans.
–add-subscription <subscription_name>
Associates the subscription with the
specified hosting plan add-on.
–remove-subscription <subscription_name>
Removes the subscription association
with the specified hosting plan
add-on.
–change-owner <subscription_name> Changes a subscription owner.
–help or -h Displays this help page.
–list or -l Displays the list of domains.
–shells or -s Displays the list of available system
shells.
–add-aps-filter-item <subscription_name>
Adds an APS applications filter item.
–remove-aps-filter-item <subscription_name>
Removes an APS applications filter
item.
–disable-aps-filter <subscription_name>
Disables the APS applications filter
and removes all its items.
–enable-aps-filter <subscription_name>
Enables the APS applications filter
for the specified hosting plan or
subscription.
–show-aps-filter-info <subscription_name>
Shows information on the active APS
applications filter.
–add-custom-plan-item <subscription_name>
Adds a hosting plan item for an
additional service.
–remove-custom-plan-item <subscription_name>
Removes a service plan item.
–remove-all-custom-plan-items <subscription_name>
Removes all service plan items.
–show-custom-plan-items <subscription_name>
Shows a list of service plan items.
–update-php-settings <subscription_name>
Updates PHP settings.
–show-php-settings <subscription_name>
Displays the current PHP settings.
–update-web-server-settings <subscription_name>
Updates the Apache settings.
–show-web-server-settings <subscription_name>
Shows the current Apache settings.

Available options:
-new_name <subscription_name> Specifies a new subscription name (may
be used only with “update” command).
-dns <true|false> Switches on/off the domain DNS zone
(default: DNS template status).
-www <true|false> Adds www prefix (default: true).
-hosting <true|false> Switches on/off web hosting for domain
(default: false).
-hst_type <phys|std|frm> Sets up the specified hosting type
(default: phys).
-http_code <301|302> Specifies the HTTP response status
code to be used for standard
forwarding.
-target_url <URL> Sets up target URL (required if
hst_type is “std” or “frm”).
-service-plan <name> Specifies service plan for
subscription creation (can be used
only with the “–create” or
“–*-subsription” command).
-force Forces creating subscription to the
specified hosting plan even if the
actual system state does not
correspond to the plan properties.
-force-lock Forces creating the subscription even
if the actual system state does not
correspond to the service plan
properties. This will create the
subscription and lock it for syncing.
-ip <IP address>[,<IP address>,..] Sets list of IPv4 and IPv6 addresses.
-mail-service-ip <IP address>[,<IP address>,..]
Sets list of IPv4 and IPv6 addresses.
-login <login> Username of system user account
associated with the subscription
(required if web hosting is
configured)
-passwd <password> Password of system user account
associated with the subscription (no
password is set by default)
-creation-date <YYYY-MM-DD> Specifies arbitrary creation date
-www-root <path> Specifies website home directory
(relative to the webspace root).
-parent-domain-name <parent_domain_name>
Use to specify the parent domain when
creating a subdomain
-hard_quota <number>[B|K|M|G|T] hard disk quota (0 for unlimited)
-ssi <true|false> SSI support (default: false)
-php <true|false> PHP support (default: false)
-php_handler_id <cgi|fastcgi|module>
Associates the PHP handler with the
site. Specify the handler’s identifier
(default: cgi).
-php_handler_type <cgi|fastcgi|module> [deprecated] use php_handler_id
PHP support mode (default: cgi)
-php_safe_mode <true|false> PHP safe mode (default: false)
[deprecated]
-cgi <true|false> CGI support (default: false)
-cgi-mode <webspace|www-root> cgi-bin directory placement mode
(default: webspace)
-perl <true|false> Perl support (default: false)
-asp <true|false> ASP support (default: false)
-python <true|false> Python support (default: false)
-fastcgi <true|false> FastCGI support (default: false)
-coldfusion <true|false> ColdFusion support (default: false)
-miva <true|false> Miva support (default: false)
-ssl <true|false> SSL support (default: false)
-err_docs <true|false> Custom error documents support
(default: false)
-log-rotate <true|false> Log rotation status (default: true)
-log-bysize <number>[B|K|M|G] Log rotation by size in bytes
-log-bytime <daily|weekly|monthly> Enables log rotation by time (default:
daily)
-log-max-num-files <number> Maximum number of log file instances
(default: 3)
-log-compress <true|false> Log files compression (default: true)
-log-email <email> Switches on sending log files to
e-mail
-owner <login> Specifies login of an existing user to
whom the subscription should belong
(required for domain creation and
domain owner change, default: admin).
-vendor <login> Specifies login of the subscription
provider – an existing user (admin or
reseller) whose resources will be
used.
-mail_service <true|false> Switches on/off the mail service
(default: true)
-mail_service_node_ip <IP address | local>
Specifies a service node which will
provide mail services for a
subscription. Allowed values: IP
address or “local” if the service is
provided by the Panel server.
-maillist_service <true|false> Turns on/off the mailing list service
(default: false)
-notify <true|false> Switches on/off notification of domain
creation
-map_ip <IP address>[,<IP address>]
Specifies new IP addresses that should
be assigned to a subscription after a
subscriber is changed.
-publish-sb-site <true|false> Creates website using PresenceBuilder
-max-connections <number> Specifies HTTP connections limit
-traffic-bandwidth <number> Specifies maximum network usage
-seo-redirect <non-www|www|none> Turns on the search engine friendly
HTTP 301 redirection. Use ‘non-www’ to
redirect from www.domain to domain,
‘www’ to redirect from domain to
www.domain, and ‘none’ to turn off the
redirection (default: non-www).
-unpaid-website-status <disabled|suspended|active>
Sets the status of websites if the
subscription is suspended (default:
suspended).
-shell <shell_name|false> The shell that a subscriber can use
for SSH access to the server. Use the
–shells command to see available
shells
-fplogin <login> FrontPage username
-fppasswd <password> FrontPage password
-webstat <none|awstats|webalizer> Statistics support (default: none)
-webstat-protdir-access <true|false>
Allows accessing web statistics
through the password protected
directory “/plesk-stat/” (default:
true)
-certificate-name <SSL certificate name>
SSL certificate name
-aps-filter-item-name <name|uri> Specifies identifier of APS
applications filter item: whether the
filtered app is identified by name or
URI.
-aps-filter-item-value <value> Specifies the actual name or URI of
the filtered APS app.
-custom-plan-item-name <name> Service plan item name.
-settings <filename> Sets the path to the file with PHP
settings.
-additional-settings <filename> Sets the path to the file with
additional PHP directives.
-apache-mime-types <mime types> Sets MIME types for the specified
website. For example: ‘text/plain .txt
image/jpeg .jpeg’.
-apache-handlers <handlers> Sets Apache handlers for the specified
website. For example: ‘php-script
.html cgi-script .cgi’.
-ip-deny <ip deny list> Sets a list of IP addresses that will
be denied access to the specified
website. Use spaces to separate IP
addresses. For example: ‘10.1.0.0/16
192.168.1.110’.
-ip-allow <ip allow list> Sets a list of IP addresses that will
be allowed access to the specified
website. Use spaces to separate IP
addresses. For example:
‘192.168.0.0/16 10.1.1.21’.
-apache-directory-index <directory index>
Sets index pages for the specified
website. For example: ‘index.html
index.htm index.text
/cgi-bin/index.pl’.
-nginx-transparent-mode <true|false>
Turns on/off the transparent mode for
the nginx reverse proxy server. In
this mode, Apache handles both static
and dynamic content, while nginx only
passes HTTP requests and responses
without modification. The default
value is “false”.
-nginx-serve-static <true|false> Turns on/off serving static content by
the nginx reverse proxy server. The
default value is “false”.
-nginx-static-extensions <extensions>
Sets static files extensions that
should be served directly by nginx. If
you specify an empty value, the static
files extensions from the default
nginx configuration
(/var/www/vhosts/domain1.tld/.plesk/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”.

Son unos pocos… Y si queréis ahorrarse tener que probar, podéis ir a este enlace en el que explico como crear una suscripción directamente desde plesk por SSH

Espero que os sirvan 🙂

 

Te puede interesar:

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *