How to Set Custom DocumentRoot for a Domain in DirectAdmin

If you need to permanently change Apache DocumentRoot for just a single domain, you should do this as Admin. Go to http://[domain]:2222/CMD_CUSTOM_HTTPD?domain=[domain] In the first window, under Only add the few lines of the VirtualHost you need to insert. Do not add a whole .. Add the following line: |?DOCROOT=/custom/document/root| Don’t forget to put pipes at the start… Read More »

How to Install Composer on a Linux Server

Here comes the guide for global composer installation. wget https://getcomposer.org/installer –2019-04-06 18:15:55– https://getcomposer.org/installer Resolving getcomposer.org (getcomposer.org)… 2001:41d0:302:1100::8:104f, 54.36.53.46 Connecting to getcomposer.org (getcomposer.org)|2001:41d0:302:1100::8:104f|:443… connected. HTTP request sent, awaiting response… 200 OK Length: 263790 (258K) [application/octet-stream] Saving to: ‘installer’ installer 100%[=====================================================================================>] 257.61K –.-KB/s in 0.1s 2019-04-06 18:15:56 (1.82 MB/s) – ‘installer’ saved [263790/263790] Rename it to composer-setup.php mv installed composer-setup.php… Read More »

How to Install Composer for a Directadmin Server

Here is a quick guide for composer setup on a DirectAdmin server (if you want to make it available for all users). We will use Directadmin Composer plugin – you can get one here First of all, we will need root access to install this plugin. Here is the list of commands for that: cd /usr/local/directadmin/plugins; wget https://github.com/Marco129/DirectAdmin-Composer/archive/master.zip;… Read More »

Couldn’t execute ‘SHOW VARIABLES LIKE ‘gtid\_mode”: Table ‘performance_schema.session_variables’ doesn’t exist (1146) – How to Fix

This issue is related to MySQL upgrade, when some table data was not updated to new format. When you try to run mysqldump or any other command, you can get this error. So let’s fix it, you’ll need root access or any other account with same privileges (if you are using Directadmin, this user might be da_admin). First,… Read More »

How to Add Imagemagick Support for PHP 7 on a Directadmin Server

If you have recently updated PHP on a Directadmin server through custombuild, you should notice that not all modules are available with the fresh installation. But don’t worry, in case of Imagemagich it’s pretty simple. cd /usr/local/php70/bin; ./pecl install imagick After that you can add the extension line to your php.ini. Path to extension will be shown upon… Read More »