How to change log rotation settings for newly created domains under a locked subscription?

Created:

2016-12-18 06:42:34 UTC

Modified:

2017-08-08 13:31:23 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to change log rotation settings for newly created domains under a locked subscription?

Applicable to:

  • Plesk 12.0 for Linux

Question

Is it possible to change log rotation settings for newly created domains under a locked subscription?

Answer

It is not possible to change log rotation settings for newly created domains under a locked subscription without synchronizing it with a Service Plan.

To change log rotation settings for all domains already created under the locked subscription example.com execute the following command:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin psa -N -e"select name from domains where name='example.com' union select name from domains where webspace_id in (select id from domains where name='example.com');" | while read DOMAIN ; do plesk bin subscription -u $DOMAIN -log-rotate true -log-bytime daily -log-compress true -log-max-num-files 14;done

Now logs will be rotated daily and will be stored on the server for 14 days.

For additional options check the documentation for Windows and for Linux .

Have more questions? Submit a request
Please sign in to leave a comment.