Tag Archives: directadmin

mod_ruid2 does not support CentOS8


To fix directadmin install/setup:

dnf install libjpeg-turbo-devel libpng-devel freetype-devel
cd /usr/local/directadmin/custombuild/
vi options.conf

mod_ruid2=no

php1_release=7.2
php1_mode=php-fpm

./build iconv
./build php y

php -v
PHP 7.2.33 (cli) (built: Sep 25 2020 20:48:19) ( NTS )

If still ERROR: Unable to globalize '/usr/local/directadmin/data/users/*/php/php-fpm72.conf' (ret=2) from /usr/local/php72/etc/php-fpm.conf at line 68

./build all d
./build rewrite_confs

./build rewrite_confs
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Using xx.xx.xx.xx for your server IP
ls: cannot access '/usr/local/directadmin/data/users/*/httpd.conf': No such file or directory
grep: /usr/local/directadmin/conf/directadmin.conf: No such file or directory
Enabling http2 in directadmin.conf.
grep: /usr/local/directadmin/conf/directadmin.conf: No such file or directory
Enabling http2 in directadmin.conf.
Job for php-fpm72.service failed because the control process exited with error code.
See "systemctl status php-fpm72.service" and "journalctl -xe" for details.
Restarting apache.
Job for httpd.service failed because the control process exited with error code.
See "systemctl status httpd.service" and "journalctl -xe" for details.

cd /usr/local/directadmin
./directadmin i
./directadmin p

./build rewrite_confs
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Using xx.xx.xx.xx for your server IP
Restarting apache.

systemctl status httpd.service | grep active
Active: active (running) since Fri 2020-09-25 21:15:35 CEST; 2min 36s ag

systemctl status php-fpm72.service | grep active
Active: active (running) since Fri 2020-09-25 21:15:32 CEST; 3min 39s ago
Status: "Processes active: 0, idle: 0, Requests: 0, slow: 0, Traffic: 0req/sec"

OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

Connecting to license.directadmin.com|185.42.221.168|:443… connected.
OpenSSL: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Unable to establish SSL connection.
Error downloading the license file from relay server as well.

echo 1 > /root/.insecure_download

DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.

directadmin DATABASE ERROR: CONNECTION FAILED! Unable to connect to the database! Please contact your server-administrator.

vi /root/.my.cnf
[client]
user=root
password="password"

Make sure mysql user username is set otherwise you will get error wrong da_roundcube password:
Executing database schema update.
ERROR: SQLSTATE[HY000] [1045] Access denied for user 'da_roundcube'@'localhost' (using password: YES)
ERROR: Failed to connect to database

enable webp support in php GD library

If you are using directadmin and want enable webp support (Centos OS)
yum install libwebp-devel
vi /usr/local/directadmin/custombuild/custom/fpm/configure.php71
--with-webp-dir=/usr/lib64
./build php
If you have php 5.6 so use --with-vpx-dir

php -r 'var_dump(gd_info());'
array(12) {
  ["GD Version"]=>
  string(26) "bundled (2.1.0 compatible)"
  ["FreeType Support"]=>
  bool(true)
  ["FreeType Linkage"]=>
  string(13) "with freetype"
  ["GIF Read Support"]=>
  bool(true)
  ["GIF Create Support"]=>
  bool(true)
  ["JPEG Support"]=>
  bool(true)
  ["PNG Support"]=>
  bool(true)
  ["WBMP Support"]=>
  bool(true)
  ["XPM Support"]=>
  bool(false)
  ["XBM Support"]=>
  bool(true)
  ["WebP Support"]=>
  bool(true)
  ["JIS-mapped Japanese Font Support"]=>
  bool(false)
}

If you do not use fpm, so:
./build used_configs | grep configure.php
PHP (default) configuration file: /usr/local/directadmin/custombuild/configure/ap2/configure.php56
cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp -fp configure/ap2/configure.php56 custom/ap2/configure.php56

sni for exim directadmin

It should fix Outlook errors like Cannot verify Security Certificate or Internet security warning
Common name: localhost issue


cd /usr/local/directadmin
echo mail_sni=1 >> conf/directadmin.conf
service directadmin restart
cd custombuild
./build update
./build set eximconf yes
./build set eximconf_release 4.5
./build set dovecot_conf yes
./build exim_conf
./build dovecot_conf

directadmin custom extension exif with php-fpm

cd /usr/local/directadmin/custombuild
mkdir /usr/local/directadmin/custombuild/custom/fpm
cp -v /usr/local/directadmin/custombuild/configure/fpm/configure.php72 /usr/local/directadmin/custombuild/custom/fpm/
cp -v /usr/local/directadmin/custombuild/configure/fpm/configure.php56 /usr/local/directadmin/custombuild/custom/fpm/

vi /usr/local/directadmin/custombuild/custom/fpm/configure.php56
#!/bin/sh
./configure \
--prefix=/usr/local/php56 \
--program-suffix=56 \
--enable-fpm \
--with-config-file-scan-dir=/usr/local/php56/lib/php.conf.d \
--with-curl=/usr/local/lib \
--with-gd \
--enable-gd-native-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-libxml-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=mysqlnd \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=mysqlnd \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xsl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--enable-zip \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--with-icu-dir=/usr/local/icu \
--enable-intl \
--enable-exif

./build php n

php -i | grep exif
exif
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15

[core:emerg] [pid :tid ] (28)No space left on device: AH00023: Couldn’t create the proxy mutex

[core:emerg] [pid 7732:tid 140396300543936] (28)No space left on device: AH00023: Couldn’t create the proxy mutex
[proxy:crit] [pid 7732:tid 140396300543936] (28)No space left on device: AH02478: failed to create proxy mutex

Fix:

ipcs | grep apache | awk ‘{print $2}’ > sem.txt
for i in `cat sem.txt`; do { ipcrm -s $i; }; done

Permanant fix:

vi /etc/sysctl.conf

kernel.msgmni = 1024
kernel.sem = 250 256000 32 1024