Changing the Log Location in the Command Line115. Click OK to save the changes.6. Open the Tasks tab, and click the Restart Server button to restart the server and apply thechanges.2.4.4. Changing the Log Location in the Command LineThe access and error log files' names and locations can be changed to rotate the files. This rotationhas to be done manually to create new files if the existing log files become too large. The locationcan be changed if the default location in /var/log/dirsrv/admin-serv/ does not meet theapplication needs.The Admin Server configuration is stored in two locations. The main entry is an LDAP entry in theConfiguration Directory Server's o=NetscapeRoot database. The other is the console.conf file.Changing the log settings requires changing both settings.1. Edit the Admin Server configuration entry in the Configuration Directory Server.a. Get the name of the Admin Server entry. Since the Admin Server entry has a special objectclass, nsAdminConfig, it is possible to search for the entry using that object class to retrievethe DN./usr/lib/mozldap/ldapsearch -D "cn=directory manager" -wsecret -p 389 -h server.example.com -b "o=NetscapeRoot""(objectclass=nsAdminConfig)" dnversion:1dn: cn=configuration, cn=admin-serv-example, cn=Red HatAdministration Server, cn=Server Group, cn=server.example.com,ou=example.com, o=NetscapeRootb. The Admin Server entry can be edited using ldapmodify. The access and error log settingsare stored in the nsAccessLogs and nsErrorLogs attributes, respectively. For example:/usr/lib/mozldap/ldapmodify -D "cn=directory manager" -w secret -p389 -h server.example.comdn: cn=configuration, cn=admin-serv-example, cn=Red HatAdministration Server, cn=Server Group, cn=server.example.com,ou=example.com, o=NetscapeRootchangetype:modifyreplace:nsAccessLognsAccessLog:/var/log/dirsrv/admin-serv//access_newHit Enter twice to submit the operation, and then Control+C to close ldapmodify.2. Open the Admin Server configuration directory.cd /etc/dirsrv/admin-serv