Error ssl intermediate chain is not valid

Здравствуйте!

Randy

Posts: 42
Joined: Thu Sep 03, 2015 6:07 pm

SSL: error ssl intermediate chain is not valid

Здравствуйте!

Подскажите, пожалуйста, что делаю не так?
Мои шаги по установки SSL (NGINX+Apache), релиз панели 16:

SSL сертификат — domain_com.crt
Ключ SSL сертификата — Private Key который создавался запрос тут: https://my.gogetssl.com/en/user/csr/generate/
Центр сертификации SSL / Intermediate — cat COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ca-bundle.crt

и выдает ошибку: error ssl intermediate chain is not valid

Также заметил, что после нажатия кнопки сохранить Центр сертификации SSL / Intermediate уже обрезанный, строки нет ——END CERTIFICATE——
обрезало
h5VkpTYghdae9C8x49OhgQ=
——END CERTIFICATE——

Можете чем-то помочь?


imperio

VestaCP Team
Posts: 6987
Joined: Sat Dec 01, 2012 12:37 pm
Contact:

Re: SSL: error ssl intermediate chain is not valid

Post

by imperio » Thu Aug 25, 2016 11:49 pm

Здравствуйте
Цепочка сертификатов имеет не правильный формат. Третье поле при добавлении ssl


Randy

Posts: 42
Joined: Thu Sep 03, 2015 6:07 pm

Re: SSL: error ssl intermediate chain is not valid

Post

by Randy » Thu Aug 25, 2016 11:51 pm

imperio wrote:Здравствуйте
Цепочка сертификатов имеет не правильный формат. Третье поле при добавлении ssl

Подскажите, пожалуйста, какая верная цепочка должна быть, если, конечно, не затруднит Вас?


imperio

VestaCP Team
Posts: 6987
Joined: Sat Dec 01, 2012 12:37 pm
Contact:

Re: SSL: error ssl intermediate chain is not valid

Post

by imperio » Thu Aug 25, 2016 11:58 pm

Смотрите чтобы не было пробелов и пропусков между сертификатами

Попробуйте так

Code: Select all

COMODORSADomainValidationSecureServerCA.crt
COMODORSAAddTrustCA.crt
AddTrustExternalCARoot.crt

Code: Select all

-----END CERTIFICATE----------BEGIN CERTIFICATE-----

Внизу не должно быть никаких пропусков, абзацев и т.п.


Randy

Posts: 42
Joined: Thu Sep 03, 2015 6:07 pm

Re: SSL: error ssl intermediate chain is not valid

Post

by Randy » Fri Aug 26, 2016 12:06 am

imperio wrote:Смотрите чтобы не было пробелов и пропусков между сертификатами

Попробуйте так

Code: Select all

COMODORSADomainValidationSecureServerCA.crt
COMODORSAAddTrustCA.crt
AddTrustExternalCARoot.crt

Code: Select all

-----END CERTIFICATE----------BEGIN CERTIFICATE-----

Внизу не должно быть никаких пропусков, абзацев и т.п.

Выполнил Ваши рекомендации, но, к сожалению ошибка сохранятся: Error: SSL intermediate chain is not valid


Randy

Posts: 42
Joined: Thu Sep 03, 2015 6:07 pm

Re: SSL: error ssl intermediate chain is not valid

Post

by Randy » Fri Aug 26, 2016 1:38 am

Вобщем, посмотрел почту. Пришел архив с файлом сертификата и с файлом domain_com.ca-bundle из него вставляю в
Центр сертификации SSL / Intermediate
выдает ошибку Error: SSL intermediate chain is not valid
В чем проблема? Уже который час мучаюсь.

Спасибо за советы и ответы.


imperio

VestaCP Team
Posts: 6987
Joined: Sat Dec 01, 2012 12:37 pm
Contact:

Re: SSL: error ssl intermediate chain is not valid

Post

by imperio » Fri Aug 26, 2016 8:57 am

Здравствуйте. Доступ и сертификаты скинете?
Посмотрим.


Randy

Posts: 42
Joined: Thu Sep 03, 2015 6:07 pm

Re: SSL: error ssl intermediate chain is not valid

Post

by Randy » Fri Aug 26, 2016 10:23 am

imperio wrote:Здравствуйте. Доступ и сертификаты скинете?
Посмотрим.

Hi!
Да , могу. Куда скинуть?



ost

Posts: 11
Joined: Fri Mar 11, 2016 10:23 pm

Re: SSL: error ssl intermediate chain is not valid

Post

by ost » Fri Jun 23, 2017 9:52 pm

ребята, помогите и мне, цепочка при установке неверна



  • Здравствуйте, Гость! Будьте предельно внимательны при выборе исполнителя. Участились случаи обмана. Доверяйте только пользователям, чья группа начинается от «Проверенные«, тем, кто имеет хотя бы какое-то количество действительно полезных сообщений на нашем форуме и тем, у кого есть хоть какая-то репутация! Так же вы можете воспользоваться услугой гаранта! Спасибо.

Профессиональный хостинг облачных VPS/VDS | Aéza

  • Автор темы

    mishazajceff

  • Дата начала

    17 Окт 2015

Статус
В этой теме нельзя размещать новые ответы.

mishazajceff


  • #1

Здравствуйте!
Требуется настроить SSL на сервере с установленным Ubuntu 14.04 и VestaCP.
Я и сам пробовал и даже много раз, но сталкивался с ошибкой «Error: SSL intermediate chain is not valid».
Jumuro, Exile, Mirovinger приглашаю вас в тему :-)

Smalesh


  • Меценат
  • #2

В картинках:

У Вас недостаточно прав для просмотра ссылок.
Вход или Регистрация

Только бандл удобней склеивать прямо на сервере, ну да ладно.
Сертификат, ключ, бандл и сохранить

Последнее редактирование: 17 Окт 2015

mishazajceff


  • #3

Smalesh, к сожалению, не все так просто.
Уже как минимум день бьюсь над ошибкой «Error: SSL intermediate chain is not valid». Пока разработчики Весты тоже помочь не смогли.

Smalesh


  • Меценат
  • #4

mishazajceff, могу поспорить. Через пару часов (раньше вряд ли освобожусь) мне доступ (админ от панели + рут от сервера) и сертификаты. Будет работать.

Ситуация следующая — там ошибка SSL Key is not valid, openssl так же ругается.

Сам бандл (если кому пригодится) собирается под Comodo PositiveSSL так:

Код:

cat COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt >  ca-bundle.crt

mishazajceff


  • #5

Огромное спасибо Smalesh за помощь в решении проблемы:cool:

:ps: Оказывается, я вместо ключа SSL сертификата вставлял CSR запрос:swoon2:

Последнее редактирование: 18 Окт 2015

Статус
В этой теме нельзя размещать новые ответы.

Современный облачный хостинг провайдер | Aéza

Контакты

ООО «АЕЗА ГРУПП»
ИНН 2312304914
ОГРН 1212300056430
г. Краснодар, ул. Маяковского 160, офис 2.4

Установка SSL-сертификата в Vesta CP

Почти всем коммерческим и не только сайтам просто необходим ssl-сертификат. Он делает сайт более безопасным с точки зрения подтверждения информации. Купить его можно у множества реселлеров в России и за рубежом. Конечно не забывайте, что сертификаты бывают разные: черные, белые и красные … Некоторые дают в браузерах некоторые особые обозначения, а другие нет. Все зависит от цены. Некоторые сертификаты можно получить за подтверждения владения над доменом, а другие только после подтверждения владения корпорацией.

Но я так полагаю, сертификат у вас уже есть. Поэтому приступим к его установке на замечательную и быструю панель управления сервером Vesta CP.

В первую очередь добавляем нужный нам домен в панель, если он добавлен просто нажимаем «редактировать» и включаем поддержку SSL нажав на галочку.

установка ssl сертификата на vesta веста

запрос scr для ssl сертификата

Далее нужно нажать «Сгенерировать CSR запрос» и откроется новое окно, в котором нужно будет ввести данные по своему домену, внимание! все на английском. Код Российской федерации будет RU. После ввода данных домена вам нужно будет нажать кнопку «ок» и вы получите три переменные.

  • SSL CSR запрос
  • SSL сертификат
  • Ключ SSL сертификата

Далее это окно закрывать НЕ СЛЕДУЕТ, оно вам потом пригодится.

Далее открываем страницу реселлера, где вы собрались покупать сертификат и после оплаты у вас попросят SSL CSR, введите его из поля SSL CSR сгенерированого нами.

После выполнения верификации домена, телефона (в зависимости от типа ssl-сертификата) вам на почту отправят 4 файла:

  • domain_com.crt
  • AddTrustExternalCARoot.crt
  • COMODORSAAddTrustCA.crt
  • COMODORSADomainValidationSecureServerCA.crt

Далее нам нужно заполнить данные ssl-сертификации на странице редактирования домена следующим образом.

поле заполнения ssl сертификата

  1. SSL сертификат – необходимо вставить код из файла domain_com.crt
  2. Ключ SSL сертификата — вставьте код, который был сгенерирован при нажатии на ссылку » Сгенерировать CSR запрос»
  3. Центр сертификации SSL / Intermediate – в это поле необходимо вставить оставшиеся отправленные файлы в указанном мной порядке: COMODORSAAddTrustCA.crt, COMODORSADomainValidationSecureServerCA.crt, AddTrustExternalCARoot.crt.

Далее нужно сохранить все сделанное вами кнопкой в самом внизу.

После вам пригодится файл .htaccess, добавьте в него парочку строчек:

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Они для того чтобы сайт с протокола http редиректился на https. Ну вот и все, теперь сайт будет сам направляться на правильный протокол, который будет работать.

Поделиться в соц. сетях

Post navigation

4 thoughts on “Установка SSL-сертификата в Vesta CP

  1. Отличная инструкция! Жаль,не видно скриншотов, но по текстовому описанию и так ясно.

    Я сделал все по инструкции. Но имею ошибку «Error: SSL intermediate chain is not valid»

    Что делать?

    • К сожалению после переноса все картинки слетели, снова буду делать добавлю новые картинки.

      Проблема скорей всего из-за того что вы неверно вставили повторные ключи или не правильно их сгенерировали, я сам час целый парился.

    • Порядок сертификатов в статье неправильный, должен быть такой:

      COMODORSADomainValidationSecureServerCA.crt

      COMODORSAAddTrustCA.crt

      AddTrustExternalCARoot.crt

      • Не совсем, порядок зависит от самого типа сертификата. Полей для ввода вроде было 3, но часто вводных данных бывает 4.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Имя *

E-mail *

Сайт

Комментарий

Можно использовать следующие HTML-теги и атрибуты:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

http://xn--90amdte2a.xn--p1ai/2015/04/27/%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-ssl-%d1%81%d0%b5%d1%80%d1%82%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%82%d0%b0-%d0%b2-vesta-cp/

  • Об авторе
  • Недавние публикации

Губарь Маргарита Александровна

Кандидат технических наук, доцент кафедры ИУ-6 (Компьютерные системы и сети) Московского государственного технического университета им. Н. Э. Баумана. Самый молодой в России PhD in Computer Science. Эксперт в области компьютерных технологий и программирования.

Стаж: 8 лет.

Образование: МГТУ им. Н. Э. Баумана, к.т.н.

Губарь Маргарита Александровна

Содержание

github twitter vestacp

Памятка для пользователей

В зависимости от конфигурации Веста устанавливается в одном из доступных режимов, которые позволяют не сильно нагружать сервер:

  • micro — меньше 1Gb RAM
    Устанавливается с минимальной конфигурацией, идет максимальная оптимизации ресурсов, отключаются антивирус с фаерволом, а так же исключается модуль mod_fcgid.

  • small — от 1Gb до 3Gb RAM
    При установке исключаются антивирус и антиспам для почты

  • medium — от 3GB до 7Gb RAM

  • large — 7GB и выше medium и large не имеют отличий при установке и устанавливают все доступные модули.

HowTo

rspamd вместо spamassassin

Проверка обновлений панели через консоль

Проверить

# v-list-sys-vesta-updates

# v-list-sys-vesta-updates
NAME         VERSION  RELEASE ARCH    UPDATED TIME      DATE
------       ------   ------  ------  ------  ------    ------
vesta        0.9.8    12      x86_64  no      17:34:05  2015-04-09
vesta-php    0.9.7    3       x86_64  yes     17:33:32  2015-04-09
vesta-nginx  0.9.8    3       x86_64  yes     17:34:57  2015-04-09

PKG          VER    REL  ARCH  UPDT  DATE
---          ---    ---  ----  ----  ----
vesta        0.9.8  26   i386  yes   2020-03-24
vesta-php    0.9.8  26   i386  yes   2020-03-24
vesta-nginx  0.9.8  26   i386  yes   2020-03-24

Обновить

v-update-sys-vesta-all

Let’s Encrypt для Exim/Postfix/Dovecot

chgrp mail ssl.your.adminpanel.com.key
chmod 660 ssl.your.adminpanel.com.key
chgrp mail ssl.your.adminpanel.com.crt
chmod 660 ssl.your.adminpanel.com.crt

Как создать поддомен внутри основного домена

Есть домен domain.ru (/home/admin/web/domain.ru/public_html). Необходимо создать поддомен img.domain.ru, содержимое которого расположено в /home/admin/web/domain.ru/public_html/img.

Для этого создаём в WEB новый домен с именем img.domain.ru.

В конфигах /home/admin/conf/web/nginx.conf и /home/admin/conf/web/apache2.conf меняем DocumentRoot.

То есть вместо каталога /home/admin/web/img.domain.ru/public_html указываем каталог /home/admin/web/domain.ru/public_html/img.

Также можно вручную создать конфиг для nginx в каталоге /home/admin/conf/web/. Если создавать через панель, то есть вероятность, что конфиг будет перезаписан и всё сломается.

И самое главное — rewrite’ы

RewriteCond $1 !^img/
RewriteCond %{HTTP_HOST} ^img.domain.ru
RewriteRule (.*) /img/$1 [L]

Есть ли селектор версии PHP?

Как поменять стандартные картинки в панели

api error

Несколько версий PHP

Описание задачи: сервер с VestaCP (CentOS или Debian неважно),
Основная версия PHP: CentOS 5.4 (Remi), Debian 5.?
Допустим, что для одного нашего сайта на Joomla 1.5 требуется PHP 5.2
Создать шаблон в Vesta и скомпилировать PHP
PHP 5.2 (через fastcgi) и PHP 5.4 (как модуль Apache2)

CentOS

Чтобы упростить себе жизнь компилировать не будем, а воспользуемся готовыми RPM пакетами из репозитория Atomic, которые устанавливаются в /opt

Debian

Как обновить PHP до 5.5 со стандартной версии 5.3 на сервере с VestaCP

via http://hasin.me/2014/06/03/upgrading-php-to-5-5-in-a-centos-6-server-with-vesta-cp/

Tested on CentOS 6 x86/x64

Stop httpd and remove current PHP version

service httpd stop
yum -y remove php*

Add Remi repo

#For 32 Bit OS
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm 
 
#For 64Bit OS
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

Install newer PHP version

yum -y install php php-bcmath php-cli php-common php-gd php-imap php-mbstring php-mcrypt php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc php-pecl-apc phpMyAdmin roundcubemail php-opcache php-xdebug
mv -f /etc/php.ini.rpmsave /etc/php.ini
mv -f /etc/roundcubemail/db.inc.php.rpmsave /etc/roundcubemail/db.inc.php
mv -f /etc/roundcubemail/main.inc.php.rpmsave /etc/roundcubemail/main.inc.php
mv -f /etc/phpMyAdmin/config.inc.php.rpmsave /etc/phpMyAdmin/config.inc.php
mv -f /etc/httpd/conf.d/roundcubemail.conf.rpmsave /etc/httpd/conf.d/roundcubemail.conf
mv -f /etc/httpd/conf.d/phpMyAdmin.conf.rpmsave /etc/httpd/conf.d/phpMyAdmin.conf
service httpd start

CLI

Ошибки, баги, глюки

Обновить PHP для nginx/php-fpm в Debian

Это сделать можно только через костыли:

А в CentOS всё нормально.

Советы не помогают.

Обычно появляется ошибка Error: php-fpm pool doesn’t exist

Зато бесплатно всё.

Не работают дополнительные FTP аккаунты (Debian/Ubuntu)

Dovecot 14094418 SSL

Ошибка

TLS: SSL_read() failed:error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca:SSL alert number 48

Добавить в /etc/dovecot/conf.d/10-ssl.conf

ssl_ca = </usr/local/vesta/ssl/certificate.crt

Неправильный подсчёт памяти на RRD графиках

После перехода на версию 0.9.8-17 с версии 0.9.8-16 всё сломалось.

Перестал учитываться buffers/cache из вывода free (видимо с приходом фикса для CentOS 7).

На недельном графике видно, как после установки нового релиза панели с 1 декабря вырос расход памяти (на самом деле нет). Со стабильных 400 свободных до 90 свободных.

Как было раньше

# free -m |awk '{print $4}'|head -n3 |tail -n1
814

Как стало в новом релизе

# free -m |grep Mem |awk '{print $4}'
78

В CentOS 6 необходимо вернть всё обратно вручную.

Файл /usr/local/vesta/bin/v-update-sys-rrd-mem в версии 0.9.8-16

# Parsing data
if [ "$period" = 'daily' ]; then
    mem=$(free -m)
    used=$(echo "$mem" |awk '{print $3}'|head -n3 |tail -n1)
    free=$(echo "$mem" |awk '{print $4}'|head -n3 |tail -n1) 
    swap=$(echo "$mem" |awk '{print $3}'|tail -n1)

Файл /usr/local/vesta/bin/v-update-sys-rrd-mem в версии 0.9.8-17

# Parsing data
if [ "$period" = 'daily' ]; then
    mem=$(free -m)
    used=$(echo "$mem" |grep Mem |awk '{print $3}')
    free=$(echo "$mem" |grep Mem |awk '{print $4}')
    swap=$(echo "$mem" |grep Swap |awk '{print $3}')

Возвращаем, всё как было в 0.9.8-16

На форуме рекомендуют ещё выполнить команды (вероятно это необязательно)

# /usr/local/vesta/bin/v-update-sys-rrd
# /usr/local/vesta/bin/v-update-sys-rrd-mem

После исправления всё вернулось на свои места

Неудачное соединение с IMAP сервером

Roundcube показывает сообщение Неудачное соединение с IMAP сервером.

Лог dovecot

Oct 22 22:22:19 imap(user@foobar.com): Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead
Oct 22 22:22:19 imap(user@foobar.com): Error: user user@foobar.com: Initialization failed: namespace configuration error: inbox=yes namespace missing
Oct 22 22:22:19 imap(user@foobar.com): Error: Invalid user settings. Refer to server log for more information.

Как исправить.

В файле etc/dovecot/conf.d/15-mailboxes.conf

после

namespace inbox {

добавляем

inbox = yes

Webmail (Roundcube) blank page белая страница

Долгое время искал почему RC выдаёт пустую страницу.

Debian 7, php из dotdeb, если php из debian репозитория, то всё нормально.

В файле /var/lib/roundcube/config/main.inc.php включаем отладку

// system error reporting: 1 = log; 2 = report (not implemented yet), 4 = show, 8 = trace
$rcmail_config['debug_level'] = 4;

После чего появляется заветная ошибка

Fatal error: Call to undefined function: MDB2_Driver_mysql::raiseError(). in /usr/share/php/MDB2.php on line 1950

Дальше всё просто

// устанавливаем MySQL пакет для MDB2
apt-get install php-mdb2-driver-mysql

// устанавливаем Pear
apt-get install php-pear

// устанавливаем MDB2 библиотеку
pear install MDB2

// устанавливаем драйвер MDB2 MySQL
pear install MDB2_Driver_Mysql

Roundcube не работает вход

Ошибка

Warning: Declaration of rcmail::get_instance($env = '') should be compatible with rcube::get_instance($mode = 0, $env = '') in /usr/share/roundcube/program/include/rcmail.php on line 30

Debian 8, PHP 7 из стороннего репозитория, Roundcube 1.1

# apt-cache show roundcube-core        
Package: roundcube-core
Source: roundcube
Version: 1.1.1+dfsg.1-2

Всё потому-что версии RC ниже 1.2 не работают с PHP 7. Или старый PHP или новый RC.

DKIM

Как создать через консоль

v-add-mail-domain-dkim %user% %domain% %key-length%
v-add-mail-domain-dkim admin foobar.com 2048

Как посмотреть и где расположен публичный ключ

Путь /usr/local/vesta/data/users/%user%/mail/%domain%.pub

Как посмотреть содержимое

v-list-mail-domain-dkim-dns %user% %domain%

Пример

# v-list-mail-domain-dkim-dns admin foobar.com      
RECORD            TTL         TYPE      VALUE
------            ---         ----      -----
_domainkey        3600   IN   TXT      "t=y; o=~;"
mail._domainkey   3600   IN   TXT      "k=rsa; p=MII_abc_длинный_ключ"

Глюк с бэкапом

Если вам не удаётся войти в панель и при этом есть ошибка «NO LANGUAGE DEFINED», то скорее всего нет свободного места.

И обычно оно занято tmp файлами от бэкапов, которые по разным причинам могут не удаляться из каталога /home/backup. При успешном бэкапе tmp файлы должны очищаться.

В первую очередь стоит проверить файл /var/log/vesta/backup.log

Далее уже можно соориентироваться по коду ошибки

VALUE NAME COMMENT
0 OK Command has been successfuly performed
1 E_ARGS Not enough arguments provided
2 E_INVALID Object or argument is not valid
3 E_NOTEXIST Object doesn’t exist
4 E_EXISTS Object already exists
5 E_SUSPENDED Object is suspended
6 E_UNSUSPENDED Object is already unsuspended
7 E_INUSE Object can’t be deleted because is used by the other object
8 E_LIMIT Object cannot be created because of hosting package limits
9 E_PASSWORD Wrong password
10 E_FORBIDEN Object cannot be accessed be the user
11 E_DISABLED Subsystem is disabled
12 E_PARSING Configuration is broken
13 E_DISK Not enough disk space to complete the action
14 E_LA Server is to busy to complete the action
15 E_CONNECT Connection failed. Host is unreachable
16 E_FTP FTP server is not responding
17 E_DB Database server is not responding
18 E_RRD RRDtool failed to update the database
19 E_UPDATE Update operation failed
20 E_RESTART Service restart failed

Известные проблемы

  1. Сама банальная — нехватка места на диске для создания бэкапа

  2. Пароль MySQL root отличается от пароля указанного в файле /usr/local/vesta/conf/mysql.conf

  3. Ошибка в каком-нибудь конфигурационном файле

Также можно встретить рекомендацию по изменению прав на каталог /home/backup

# chmod -R 775 /home/backup

Баг на гитхабе — https://github.com/serghey-rodin/vesta/issues/1035

Глюк с бэкапом 2

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Лог файл /var/log/vesta/backup.log

-- DB --
2017-03-28 14:44:56 admin_database1 (mysql)
2017-03-28 14:44:57 admin_database2 (mysql)
2017-03-28 14:45:25 admin_foobar1 (mysql)
2017-03-28 14:45:51 admin_foobar2 (mysql)
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
sudo: unable to resolve current working directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
exim: can't get the current working directory: No such file or directory
Error: dump admin_foobar2 failed

Из форума Весты я извлёк следующее

Если Error: dump admin_dbname failed, то скорее всего дело таблицы не существуют или повреждены и надо сделать repair

mysqlcheck --no-defaults -u root -p --all-databases
mysqlcheck --no-defaults -u root -p --all-databases -o
mysqlcheck --no-defaults -u root -p --all-databases --auto-repair
mysqlcheck --no-defaults -u root -p --all-databases --analyze

Если shell-init: error retrieving current directory: getcwd, то скорее всего фактическое имя базы в /var/lib/mysql отличается от имени базы в интерфейсе панели.

Неверный размер БД в VestaCP

Кнопка обновить счётчики не работает.

Выполняем вручную cron задачу

# /usr/local/vesta/bin/v-update-sys-queue disk

В Proftpd копируются только файлы, не создаются каталоги

В логе FTP клиента что-то похожее на 550 Нет такого файла или каталога.

Добавляем VRootEngine off в proftpd.conf

Error: DNS_SYSTEM is not enabled

Не добавляется домен, ошибка Error: DNS_SYSTEM is not enabled

Проявляется если не установлен BIND и установка (vst-install.sh) производилась с ключом –named no

Вероятно исправят в следующем релизе

Не работает php mail() и 550 Unroutable sender address

Лог exim:

2014-09-01 09:32:02 no host name found for IP address 112.146.198.65
2014-09-01 10:03:29 H=a94-132-210-11.cpe.netcabo.pt [94.132.210.11] rejected connection in "connect" ACL: rejected because 94.132.210.11 is in a black list at bl.spamcop.netnBlocked - see http://www.spamcop.net/bl.shtml?94.132.210.11
2014-09-01 10:05:36 no IP address found for host internet.skynt.pl (during SMTP connection from [91.232.192.254])
2014-09-01 10:12:31 H=inzary.ru (yunobol.ru) [62.109.29.224] F=<info@inzary.ru> rejected RCPT <info@flatpr.ru>: Unrouteable address
2014-09-01 11:08:52 1XOPTg-0004J7-9N Completed
2014-09-01 11:08:52 1XOPTg-0004JA-IL ** root@vm1113.foobar.com: Unrouteable address
2014-09-01 11:08:52 1XOPTg-0004JA-IL Frozen (delivery error message)
2014-09-01 11:10:24 1XOPVA-0004bB-GJ <= root@vm1113.foobar.com U=root P=local S=394
2014-09-01 11:10:24 1XOPVA-0004bB-GJ ** foobar@mail.ru R=dnslookup T=remote_smtp: SMTP error from remote mail server after MAIL FROM:<root@vm1113.foobar.com> SIZE=1429: host mxs.mail.ru [94.100.180.150]: 550 Unroutable sender address
2014-09-01 11:10:24 1XOPVA-0004bE-Tx <= <> R=1XOPVA-0004bB-GJ U=exim P=local S=1353
2014-09-01 11:10:24 1XOPVA-0004bB-GJ Completed
2014-09-01 11:10:24 1XOPVA-0004bE-Tx ** root@vm1113.foobar.com: Unrouteable address
2014-09-01 11:10:24 1XOPVA-0004bE-Tx Frozen (delivery error message)
2014-09-01 11:10:44 exim 4.72 daemon started: pid=17703, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 587 (IPv6 and IPv4) port 2525 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)
2014-09-01 11:10:44 Start queue run: pid=17704
2014-09-01 11:10:44 End queue run: pid=17704
2014-09-01 11:10:47 1XOPVX-0004bh-6m <= root@vm1113.foobar.com U=root P=local S=394
2014-09-01 11:10:48 1XOPVX-0004bh-6m ** foobar@mail.ru R=dnslookup T=remote_smtp: SMTP error from remote mail server after MAIL FROM:<root@vm1113.foobar.com> SIZE=1429: host mxs.mail.ru [94.100.180.150]: 550 Unroutable sender address
2014-09-01 11:10:48 1XOPVY-0004bl-3w <= <> R=1XOPVX-0004bh-6m U=exim P=local S=1353
2014-09-01 11:10:48 1XOPVX-0004bh-6m Completed
2014-09-01 11:10:48 1XOPVY-0004bl-3w ** root@vm1113.foobar.com: Unrouteable address
2014-09-01 11:10:48 1XOPVY-0004bl-3w Frozen (delivery error message)
2014-09-01 11:11:44 1XOPWS-0004rX-U3 <= root@vm1113.foobar.com U=root P=local S=394
2014-09-01 11:11:45 1XOPWS-0004rX-U3 ** foobar@mail.ru R=dnslookup T=remote_smtp: SMTP error from remote mail server after MAIL FROM:<root@vm1113.foobar.com> SIZE=1429: host mxs.mail.ru [217.69.139.150]: 550 Unroutable sender address
2014-09-01 11:11:45 1XOPWT-0004ra-Fh <= <> R=1XOPWS-0004rX-U3 U=exim P=local S=1353
2014-09-01 11:11:45 1XOPWS-0004rX-U3 Completed

mail.ru считает обратный адрес несуществующим. vm1113.foobar.com (hostname) должен отвечать на пинг извне (проверить также /etc/hosts).

Решение:

Указать hostname


Добавить запись в /etc/hosts


Создать PTR (rDNS) запись


Tips n tricks

Файловый менеджер

Было 2 платных плагина (file manager и sftp). С сайта Весты информация о плагине file manager куда-то исчезла.

Для активации плагина добавить в конец файла /usr/local/vesta/conf/vesta.conf строку

FILEMANAGER_KEY='ILOVEREO'

11 марта 2019 — работает

exim не принимает письма если clamd упал

phpmyadmin 1142 — SELECT command denied to user ‘admin_db’@’localhost’ for table ‘pma__table_uiprefs’

phpmyadmin The secret passphrase in configuration (blowfish_secret) is too short

Добавляем в /etc/phpMyAdmin/config.inc.php пароль длиной 32 символа.

$cfg['blowfish_secret'] = '12345678901234567890123456789012';

Документация — https://docs.phpmyadmin.net/en/latest/config.html#cfg_blowfish_secret

Однако в некоторых случаях проблема связана с правами доступа

chmod 644 /etc/phpMyAdmin/config.inc.php
chmod 755 /etc/phpMyAdmin/

phpmyadmin операция импорта невозможна

Текст ошибки — Операция импорта невозможна. Причины: не выбран импортируемый файл; размер импортируемого файла превышает максимально допустимый, заданный в настройках PHP. Смотрите FAQ 1.16.

Debian/Ubuntu?

chmod 777 /var/lib/phpmyadmin/tmp

CentOS

chmod 777 /var/phpmyadmin/tmp

phpmyadmin 403 forbidden

phpmyadmin выдает 403 ошибку.

Загружаем заново конфигурационный файл phpmyadmin для Apache

# wget http://c.vestacp.com/0.9.8/rhel/httpd-pma.conf -O /etc/httpd/conf.d/phpMyAdmin.conf
# service httpd restart

Используемые порты

80 — nginx стандартный веб порт

443 — nginx SSL веб порт

8080 — httpd веб порт

8433 — httpd SSL веб порт

8083 — VestaCP web порт

Смена IP адреса

Страница заглушка (домен по-умолчанию, default.domain)

Почта уходит в спам

SSL

Ссылки

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies

  • Команда форума
  • #21

Как раз заверщилась установка Debian — попробую Весту, может и сдружимся с ней. :beer:

P.S. ISP — тоже наши :)

Добавлено через 5 минут
Это жесть… Накатил Debian и… забыл пароль!:lol:

Удачи в юзе весты, как сказали выше — сообщество реально большое и если и есть какие то проблемы — то их давно решили.
Я лично быстро с isp перелез.

Tallanvor

Tallanvor

НЕ ПИШУ я плагины!!! И не правлю! И ваще…


  • #22

selax, кстати, помимо Весты могу посоветовать ещё использовать контейнера — lxc
Реально упрощает жизнь, особенно в плане изоляции, ресетапа и переездов ;)

  • #23

selax, кстати, помимо Весты могу посоветовать ещё использовать контейнера — lxc
Реально упрощает жизнь, особенно в плане изоляции, ресетапа и переездов ;)

Не, ну это сложное что-то. Я вообще на самом деле не айтишник и мне это всё сложно. Просто опыта over 10 лет. А так я больше микроэлектроникой увлекаюсь.

Последнее редактирование: 9 Янв 2016

Tallanvor

Tallanvor

НЕ ПИШУ я плагины!!! И не правлю! И ваще…


  • #24

selax, оно только кажется таким :)
На самом деле, достаточно только вникнуть ;)

  • #25

Позволяет не юзать апач, а перейти на связку nginx + fpm

Не юзать апач? Это как? :-D
А вообще всегда хотел попробовать от него отказаться, но как то из принципа «работает и ладно» забивал.
У меня сейчас цель, если по ключевым словам, то — debian, vesta, nginx, fpm, ssl, xenforo
Как думаете, без бубна это всё получится поставить? :D

Tallanvor

Tallanvor

НЕ ПИШУ я плагины!!! И не правлю! И ваще…


  • #26

selax, легко и просто :)
Единственный затык может быть, когда на ксене попытаешься врубить ЧПУ, но и на это ответ гуглится за 5 минут

  • #27

selax, легко и просто :)
Единственный затык может быть, когда на ксене попытаешься врубить ЧПУ, но и на это ответ гуглится за 5 минут

Ну тогда самое сложное для меня — не забыть пароль от рута.:-D

  • Команда форума
  • #28

Не юзать апач? Это как? :-D
А вообще всегда хотел попробовать от него отказаться, но как то из принципа «работает и ладно» забивал.
У меня сейчас цель, если по ключевым словам, то — debian, vesta, nginx, fpm, ssl, xenforo
Как думаете, без бубна это всё получится поставить? :D

У меня именно такой список стоит, обошёлся без бубна)

selax, легко и просто :)
Единственный затык может быть, когда на ксене попытаешься врубить ЧПУ, но и на это ответ гуглится за 5 минут

Неа, ЧПУ включил и не было проблем, что на старой весте, когда с апачем работала, что на новой, в чём ошибка проявлялась?

Tallanvor

Tallanvor

НЕ ПИШУ я плагины!!! И не правлю! И ваще…


  • #29

Monomizer, рерайты, как обычно :)
Для nginx правила писать надо.

  • #30

Что-то SSL совсем не заводится… Ну вот совсём. :(
Сертификат и ключ ввёл из весты. С ними окно закрывается без ошибок, но сайт по https не пашет. Ошибка — ERR_CONNECTION_REFUSED

Если вводить какие либо данные, из присланных мне wosign в окошко intermediate, то оно выдаёт ошибку: «Error: SSL intermediate chain is not valid». В ISPmanager у меня завелось всё с первого раза. Тут перепробовал вообще все цепочки сертификатов и по отдельности что есть.

  • Команда форума
  • #31

Что-то SSL совсем не заводится… Ну вот совсём. :(
Сертификат и ключ ввёл из весты. С ними окно закрывается без ошибок, но сайт по https не пашет. Ошибка — ERR_CONNECTION_REFUSED

Если вводить какие либо данные, из присланных мне wosign в окошко intermediate, то оно выдаёт ошибку: «Error: SSL intermediate chain is not valid». В ISPmanager у меня завелось всё с первого раза. Тут перепробовал вообще все цепочки сертификатов и по отдельности что есть.

Т.е. ты уже прикрепил домен и в /list/web/ нужного тебе домена установил поддержку ssl, введя данные во все три формы?

  • #32

Т.е. ты уже прикрепил домен и в /list/web/ нужного тебе домена установил поддержку ssl, введя данные во все три формы?

Вообще не в курсе о чём ты. В ISPmanager я просто тыкал галочку SSL и вставлял сертификаты.

Tallanvor

Tallanvor

НЕ ПИШУ я плагины!!! И не правлю! И ваще…


  • #34

По этой ссылке нет решения.

Добавлено через 14 часов 54 минуты
Как не извращался — так и не смог там всё завести.
Поставил ISPmanager — nginx+fpm тоже присутствует из коробки. SSL завёлся сразу — в те же самые поля ввёл те же самые данные.

В весте не понравилось множество мелочей вроде не работающего Ctrl+A, многакликов мышкой по полю и так далее.

Последнее редактирование: 9 Янв 2016

  • #35

не могу заставить работать cron в vesta

cd /home/admin/web/****/public_html/stats/scripts && ./run_hlstats start 1 25583 >/dev/null 2>&1

  • Команда форума
  • #36

не могу заставить работать cron в vesta

cd /home/admin/web/****/public_html/stats/scripts && ./run_hlstats start 1 25583 >/dev/null 2>&1

Запускал без >/dev/null 2>&1 и нормально работало, запусти через консоль ssh скрипт, что выдаст?
М.б. он просто не стартует или прав нету, консольку бы глянуть…
Крон там пашет на ура, бекапы то ведь делает)

  • #37

По SSH стартует

HLstatsX:CE daemon control
http://www.hlxce.com
—————————
Attempting to start HLstatsX:CE daemon on port 25583…
Daemon successfully started on port 25583

  • Команда форума
  • #38

По SSH стартует

HLstatsX:CE daemon control
http://www.hlxce.com
—————————
Attempting to start HLstatsX:CE daemon on port 25583…
Daemon successfully started on port 25583

Я вот забыл, не нужно ли писать в кроне
sudo /home/web/…
И соблюдай безопасность, лучше под сайт отдельного пользователя ставить ;) (Ну это я бы лично для себя сделал)
+ не уверен, но м.б. не от того пользователя запускается или флаги не выданы
Вычитал

Vesta запускает команды от владельца сайта, sudo не будет работать, даже у юзера admin нет доступа к sudo

И всё равно не уверен по поводу sudo…
/var/log или какие то другие логи есть?

___
Через 2-3 буду заново ставить статистику, если проблема не решится, маякни в ЛС

Последнее редактирование: 10 Янв 2016

  • #39

Я пробовал и sudo и cd

Логи там есть,только под каким названием файл нужен?

  • Команда форума
  • #40

Я пробовал и sudo и cd

Логи там есть,только под каким названием файл нужен?

Да возможности глянуть нету, сохрани логи себе и помониторь, я просто расположение не помню эррор логов, м.б. они вообще в var лежат
Как Выше написал, если проблема не решится, через 2-3 дня сам ставить буду, гляну, почему так получается, я ставил 2 раза без sudo и работало

#———————————————————-# # WEB # #———————————————————-# # Web template check is_web_template_valid() { if [ ! -z «$WEB_SYSTEM» ]; then tpl=»$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$1.tpl» stpl=»$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$1.stpl» if [ ! -e «$tpl» ] || [ ! -e «$stpl» ]; then check_result $E_NOTEXIST «$1 web template doesn’t exist» fi fi } # Proxy template check is_proxy_template_valid() { if [ ! -z «$PROXY_SYSTEM» ]; then tpl=»$WEBTPL/$PROXY_SYSTEM/$1.tpl» stpl=»$WEBTPL/$PROXY_SYSTEM/$1.stpl» if [ ! -e «$tpl» ] || [ ! -e «$stpl» ]; then check_result $E_NOTEXIST «$1 proxy template doesn’t exist» fi fi } # Backend template check is_backend_template_valid() { if [ ! -z «$WEB_BACKEND» ]; then if [ ! -e «$WEBTPL/$WEB_BACKEND/$1.tpl» ]; then check_result $E_NOTEXIST «$1 backend template doesn’t exist» fi fi } # Web domain existence check is_web_domain_new() { web=$(grep -F -H «DOMAIN=’$1′» $VESTA/data/users/*/web.conf) if [ ! -z «$web» ]; then if [ «$type» == ‘web’ ]; then check_result $E_EXISTS «Web domain $1 exist» fi web_user=$(echo «$web» |cut -f 7 -d /) if [ «$web_user» != «$user» ]; then check_result $E_EXISTS «Web domain $1 exist» fi fi } # Web alias existence check is_web_alias_new() { web_alias=$(grep -wH «$1» $VESTA/data/users/*/web.conf) if [ ! -z «$web_alias» ]; then a1=$(echo «$web_alias» |grep -F «‘$1′» |cut -f 7 -d /) if [ ! -z «$a1» ] && [ «$2» == «web» ]; then check_result $E_EXISTS «Web alias $1 exists» fi if [ ! -z «$a1» ] && [ «$a1» != «$user» ]; then check_result $E_EXISTS «Web alias $1 exists» fi a2=$(echo «$web_alias» |grep -F «‘$1,» |cut -f 7 -d /) if [ ! -z «$a2» ] && [ «$2» == «web» ]; then check_result $E_EXISTS «Web alias $1 exists» fi if [ ! -z «$a2» ] && [ «$a2» != «$user» ]; then check_result $E_EXISTS «Web alias $1 exists» fi a3=$(echo «$web_alias» |grep -F «,$1,» |cut -f 7 -d /) if [ ! -z «$a3» ] && [ «$2» == «web» ]; then check_result $E_EXISTS «Web alias $1 exists» fi if [ ! -z «$a3» ] && [ «$a3» != «$user» ]; then check_result $E_EXISTS «Web alias $1 exists» fi a4=$(echo «$web_alias» |grep -F «,$1′» |cut -f 7 -d /) if [ ! -z «$a4» ] && [ «$2» == «web» ]; then check_result $E_EXISTS «Web alias $1 exists» fi if [ ! -z «$a4» ] && [ «$a4» != «$user» ]; then check_result $E_EXISTS «Web alias $1 exists» fi fi } # Prepare web backend prepare_web_backend() { if [ -d «/etc/php-fpm.d» ]; then pool=»/etc/php-fpm.d» fi if [ -d «/etc/php5/fpm/pool.d» ]; then pool=»/etc/php5/fpm/pool.d» fi if [ ! -e «$pool» ]; then pool=$(find /etc/php* -type d ( -name «pool.d» -o -name «*fpm.d» )) if [ ! -e «$pool» ]; then check_result $E_NOTEXIST «php-fpm pool doesn’t exist» fi fi backend_type=»$domain» if [ «$WEB_BACKEND_POOL» = ‘user’ ]; then backend_type=»$user» fi if [ -e «$pool/$backend_type.conf» ]; then backend_lsnr=$(grep «listen =» $pool/$backend_type.conf) backend_lsnr=$(echo «$backend_lsnr» |cut -f 2 -d = |sed «s/ //») if [ ! -z «$(echo $backend_lsnr |grep /)» ]; then backend_lsnr=»unix:$backend_lsnr» fi fi } # Prepare web aliases prepare_web_aliases() { i=1 for tmp_alias in ${1//,/ }; do tmp_alias_idn=»$tmp_alias» if [[ «$tmp_alias» = *[![:ascii:]]* ]]; then tmp_alias_idn=$(idn -t —quiet -a $tmp_alias) fi if [[ $i -eq 1 ]]; then aliases=»$tmp_alias» aliases_idn=»$tmp_alias_idn» alias_string=»ServerAlias $tmp_alias_idn» else aliases=»$aliases,$tmp_alias» aliases_idn=»$aliases_idn,$tmp_alias_idn» if (( $i % 100 == 0 )); then alias_string=»$alias_stringn ServerAlias $tmp_alias_idn» else alias_string=»$alias_string $tmp_alias_idn» fi fi alias_number=$i ((i++)) done } # Update web domain values prepare_web_domain_values() { if [[ «$domain» = *[![:ascii:]]* ]]; then domain_idn=$(idn -t —quiet -a $domain) else domain_idn=$domain fi group=»$user» email=»info@$domain» docroot=»$HOMEDIR/$user/web/$domain/public_html» sdocroot=»$docroot» if [ «$SSL_HOME» = ‘single’ ]; then sdocroot=»$HOMEDIR/$user/web/$domain/public_shtml» ; fi if [ ! -z «$WEB_BACKEND» ]; then prepare_web_backend fi server_alias=» alias_string=» aliases_idn=» prepare_web_aliases $ALIAS ssl_crt=»$HOMEDIR/$user/conf/web/ssl.$domain.crt» ssl_key=»$HOMEDIR/$user/conf/web/ssl.$domain.key» ssl_pem=»$HOMEDIR/$user/conf/web/ssl.$domain.pem» ssl_ca=»$HOMEDIR/$user/conf/web/ssl.$domain.ca» if [ ! -e «$USER_DATA/ssl/$domain.ca» ]; then ssl_ca_str=’#’ fi if [ «$SUSPENDED» = ‘yes’ ]; then docroot=»$VESTA/data/templates/web/suspend» sdocroot=»$VESTA/data/templates/web/suspend» fi } # Add web config add_web_config() { conf=»$HOMEDIR/$user/conf/web/$1.conf» if [[ «$2» =~ stpl$ ]]; then conf=»$HOMEDIR/$user/conf/web/s$1.conf» fi cat $WEBTPL/$1/$WEB_BACKEND/$2 | sed -e «s|%ip%|$local_ip|g» -e «s|%domain%|$domain|g» -e «s|%domain_idn%|$domain_idn|g» -e «s|%alias%|${aliases//,/ }|g» -e «s|%alias_idn%|${aliases_idn//,/ }|g» -e «s|%alias_string%|$alias_string|g» -e «s|%email%|info@$domain|g» -e «s|%web_system%|$WEB_SYSTEM|g» -e «s|%web_port%|$WEB_PORT|g» -e «s|%web_ssl_port%|$WEB_SSL_PORT|g» -e «s|%backend_lsnr%|$backend_lsnr|g» -e «s|%rgroups%|$WEB_RGROUPS|g» -e «s|%proxy_system%|$PROXY_SYSTEM|g» -e «s|%proxy_port%|$PROXY_PORT|g» -e «s|%proxy_ssl_port%|$PROXY_SSL_PORT|g» -e «s/%proxy_extentions%/${PROXY_EXT//,/|}/g» -e «s|%user%|$user|g» -e «s|%group%|$user|g» -e «s|%home%|$HOMEDIR|g» -e «s|%docroot%|$docroot|g» -e «s|%sdocroot%|$sdocroot|g» -e «s|%ssl_crt%|$ssl_crt|g» -e «s|%ssl_key%|$ssl_key|g» -e «s|%ssl_pem%|$ssl_pem|g» -e «s|%ssl_ca_str%|$ssl_ca_str|g» -e «s|%ssl_ca%|$ssl_ca|g» >> $conf chown root:$user $conf chmod 640 $conf if [ -z «$(grep «$conf» /etc/$1/conf.d/vesta.conf)» ]; then if [ «$1» != ‘nginx’ ]; then echo «Include $conf» >> /etc/$1/conf.d/vesta.conf else echo «include $conf;» >> /etc/$1/conf.d/vesta.conf fi fi trigger=»${2/.*pl/.sh}» if [ -x «$WEBTPL/$1/$WEB_BACKEND/$trigger» ]; then $WEBTPL/$1/$WEB_BACKEND/$trigger $user $domain $ip $HOMEDIR $HOMEDIR/$user/web/$domain/public_html fi } # Get config top and bottom line number get_web_config_lines() { tpl_lines=$(egrep -ni «name %domain_idn%» $1 |grep -w %domain_idn%) tpl_lines=$(echo «$tpl_lines» |cut -f 1 -d :) tpl_last_line=$(wc -l $1 |cut -f 1 -d ‘ ‘) if [ -z «$tpl_lines» ]; then check_result $E_PARSING «can’t parse template $1» fi vhost_lines=$(grep -niF «name $domain_idn» $2) vhost_lines=$(echo «$vhost_lines» |egrep «$domain_idn$|$domain_idn «) vhost_lines=$(echo «$vhost_lines» |cut -f 1 -d :) if [ -z «$vhost_lines» ]; then check_result $E_PARSING «can’t parse config $2» fi top_line=$((vhost_lines + 1 — tpl_lines)) bottom_line=$((top_line — 1 + tpl_last_line)) multi=$(sed -n «$top_line,$bottom_line p» $2 |grep ServerAlias |wc -l) if [ «$multi» -ge 2 ]; then bottom_line=$((bottom_line + multi -1)) fi } # Replace web config replace_web_config() { conf=»$HOMEDIR/$user/conf/web/$1.conf» if [[ «$2» =~ stpl$ ]]; then conf=»$HOMEDIR/$user/conf/web/s$1.conf» fi get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf sed -i «$top_line,$bottom_line s|$old|$new|g» $conf } # Delete web configuartion del_web_config() { conf=»$HOMEDIR/$user/conf/web/$1.conf» if [[ «$2» =~ stpl$ ]]; then conf=»$HOMEDIR/$user/conf/web/s$1.conf» fi get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf sed -i «$top_line,$bottom_line d» $conf web_domains=$(grep DOMAIN $USER_DATA/web.conf |wc -l) if [ «$web_domains» -eq ‘0’ ]; then sed -i «/.*/$user/.*$1.conf/d» /etc/$1/conf.d/vesta.conf rm -f $conf fi } # SSL certificate verification is_web_domain_cert_valid() { if [ ! -e «$ssl_dir/$domain.crt» ]; then echo «Error: $ssl_dir/$domain.crt not found» log_event «$E_NOTEXIST» «$ARGUMENTS» exit $E_NOTEXIST fi if [ ! -e «$ssl_dir/$domain.key» ]; then echo «Error: $ssl_dir/$domain.key not found» log_event «$E_NOTEXIST» «$ARGUMENTS» exit $E_NOTEXIST fi crt_vrf=$(openssl verify $ssl_dir/$domain.crt 2>&1) if [ ! -z «$(echo $crt_vrf | grep ‘unable to load’)» ]; then echo «Error: SSL Certificate is not valid» log_event «$E_INVALID» «$ARGUMENTS» exit $E_INVALID fi if [ ! -z «$(echo $crt_vrf | grep ‘unable to get local issuer’)» ]; then if [ ! -e «$ssl_dir/$domain.ca» ]; then echo «Error: Certificate Authority not found» log_event «$E_NOTEXIST» «$ARGUMENTS» exit $E_NOTEXIST fi fi if [ -e «$ssl_dir/$domain.ca» ]; then s1=$(openssl x509 -text -in $ssl_dir/$domain.crt 2>/dev/null) s1=$(echo «$s1» |grep Issuer |awk -F = ‘{print $6}’ |head -n1) s2=$(openssl x509 -text -in $ssl_dir/$domain.ca 2>/dev/null) s2=$(echo «$s2» |grep Subject |awk -F = ‘{print $6}’ |head -n1) if [ «$s1» != «$s2» ]; then echo «Error: SSL intermediate chain is not valid» log_event «$E_NOTEXIST» «$ARGUMENTS» exit $E_NOTEXIST fi fi key_vrf=$(grep ‘PRIVATE KEY’ $ssl_dir/$domain.key | wc -l) if [ «$key_vrf» -ne 2 ]; then echo «Error: SSL Key is not valid» log_event «$E_INVALID» «$ARGUMENTS» exit $E_INVALID fi openssl s_server -quiet -cert $ssl_dir/$domain.crt -key $ssl_dir/$domain.key >> /dev/null 2>&1 & pid=$! sleep 0.5 disown &> /dev/null kill $pid &> /dev/null if [ «$?» -ne ‘0’ ]; then echo «Error: ssl certificate key pair is not valid» log_event «$E_INVALID» «$ARGUMENTS» exit $E_INVALID fi } #———————————————————-# # DNS # #———————————————————-# # DNS template check is_dns_template_valid() { if [ ! -e «$DNSTPL/$1.tpl» ]; then check_result $E_NOTEXIST «$1 dns template doesn’t exist» fi } # DNS domain existence check is_dns_domain_new() { dns=$(ls $VESTA/data/users/*/dns/$1.conf 2>/dev/null) if [ ! -z «$dns» ]; then if [ «$2» == ‘dns’ ]; then check_result $E_EXISTS «DNS domain $1 exists» fi dns_user=$(echo «$dns» |cut -f 7 -d /) if [ «$dns_user» != «$user» ]; then check_result $E_EXISTS «DNS domain $1 exists» fi fi } # Update domain zone update_domain_zone() { domain_param=$(grep «DOMAIN=’$domain'» $USER_DATA/dns.conf) eval $domain_param SOA=$(idn —quiet -a -t «$SOA») if [ -z «$SERIAL» ]; then SERIAL=$(date +’%Y%m%d01′) fi zn_conf=»$HOMEDIR/$user/conf/dns/$domain.db» echo «$TTL $TTL @ IN SOA $SOA. root.$domain_idn. ( $SERIAL 7200 3600 1209600 180 ) » > $zn_conf fields=’$RECORDt$TTLtINt$TYPEt$PRIORITYt$VALUE’ while read line ; do IFS=$’n’ for key in $(echo $line|sed «s/’ /’n/g»); do eval ${key%%=*}=»${key#*=}» done RECORD=$(idn —quiet -a -t «$RECORD») if [ «$TYPE» = ‘CNAME’ ] || [ «$TYPE» = ‘MX’ ]; then VALUE=$(idn —quiet -a -t «$VALUE») fi if [ «$SUSPENDED» != ‘yes’ ]; then eval echo -e «»$fields»»|sed «s/%quote%/’/g» >> $zn_conf fi done < $USER_DATA/dns/$domain.conf } # Update zone serial update_domain_serial() { zn_conf=»$HOMEDIR/$user/conf/dns/$domain.db» if [ -e $zn_conf ]; then zn_serial=$(head $zn_conf |grep ‘SOA’ -A1 |tail -n 1 |sed «s/ //g») s_date=$(echo ${zn_serial:0:8}) c_date=$(date +’%Y%m%d’) if [ «$s_date» == «$c_date» ]; then cur_value=$(echo ${zn_serial:8} ) new_value=$(expr $cur_value + 1 ) len_value=$(expr length $new_value) if [ 1 -eq «$len_value» ]; then new_value=’0’$new_value fi serial=»$c_date»»$new_value» else serial=»$(date +’%Y%m%d01′)» fi else serial=»$(date +’%Y%m%d01′)» fi add_object_key «dns» ‘DOMAIN’ «$domain» ‘SERIAL’ ‘RECORDS’ update_object_value ‘dns’ ‘DOMAIN’ «$domain» ‘$SERIAL’ «$serial» } # Get next DNS record ID get_next_dnsrecord(){ if [ -z «$id» ]; then curr_str=$(grep «ID=» $USER_DATA/dns/$domain.conf | cut -f 2 -d ‘ | sort -n|tail -n1) id=»$((curr_str +1))» fi } # Sort DNS records sort_dns_records() { conf=»$USER_DATA/dns/$domain.conf» cat $conf |sort -n -k 2 -t ‘ >$conf.tmp mv -f $conf.tmp $conf } # Check if this is a last record is_dns_record_critical() { str=$(grep «ID=’$id'» $USER_DATA/dns/$domain.conf) eval $str if [ «$TYPE» = ‘A’ ] || [ «$TYPE» = ‘NS’ ]; then records=$(grep «TYPE=’$TYPE'» $USER_DATA/dns/$domain.conf| wc -l) if [ $records -le 1 ]; then echo «Error: at least one $TYPE record should remain active» log_event «$E_INVALID» «$ARGUMENTS» exit $E_INVALID fi fi } # Check if dns record is valid is_dns_fqnd() { t=$1 r=$2 fqdn_type=$(echo $t | grep «NS|CNAME|MX|PTR|SRV») tree_length=3 if [ $t = ‘CNAME’ ]; then tree_length=2 fi if [ ! -z «$fqdn_type» ]; then dots=$(echo $dvalue | grep -o «.» | wc -l) if [ «$dots» -lt «$tree_length» ]; then r=$(echo $r|sed -e «s/.$//») msg=»$t record $r should be a fully qualified domain name (FQDN)» echo «Error: $msg» log_event «$E_INVALID» «$ARGUMENTS» exit $E_INVALID fi fi } # Validate nameserver is_dns_nameserver_valid() { d=$1 t=$2 r=$3 if [ «$t» = ‘NS’ ]; then remote=$(echo $r |grep «.$domain.$») if [ ! -z «$remote» ]; then zone=$USER_DATA/dns/$d.conf a_record=$(echo $r |cut -f 1 -d ‘.’) n_record=$(grep «RECORD=’$a_record'» $zone| grep «TYPE=’A'») if [ -z «$n_record» ]; then check_result $E_NOTEXIST «IN A $a_record.$d does not exist» fi fi fi } #———————————————————-# # MAIL # #———————————————————-# # Mail domain existence check is_mail_domain_new() { mail=$(ls $VESTA/data/users/*/mail/$1.conf 2>/dev/null) if [ ! -z «$mail» ]; then if [ «$2» == ‘mail’ ]; then check_result $E_EXISTS «Mail domain $1 exists» fi mail_user=$(echo «$mail» |cut -f 7 -d /) if [ «$mail_user» != «$user» ]; then check_result $E_EXISTS «Mail domain $1 exists» fi fi } # Checking mail account existance is_mail_new() { check_acc=$(grep «ACCOUNT=’$1′» $USER_DATA/mail/$domain.conf) if [ ! -z «$check_acc» ]; then check_result $E_EXIST «mail account $1 is already exists» fi check_als=$(awk -F «ALIAS='» ‘{print $2}’ $USER_DATA/mail/$domain.conf ) check_als=$(echo «$check_als» | cut -f 1 -d «‘» | grep -w $1) if [ ! -z «$check_als» ]; then check_result $E_EXIST «mail alias $1 is already exists» fi } #———————————————————-# # CMN # #———————————————————-# # Checking domain existance is_domain_new() { type=$1 for object in ${2//,/ }; do if [ ! -z «$WEB_SYSTEM» ]; then is_web_domain_new $object $type is_web_alias_new $object $type fi if [ ! -z «$DNS_SYSTEM» ]; then is_dns_domain_new $object $type fi if [ ! -z «$MAIL_SYSTEM» ]; then is_mail_domain_new $object $type fi done } # Get domain variables get_domain_values() { eval $(grep «DOMAIN=’$domain'» $USER_DATA/$1.conf) }

What do you think of a website that displays SSL/TLS certificate errors when you visit it? Most people abandon it in disappointment. A certain amount of trust and respect for the service is lost. After investing a lot of effort and time in getting users to visit your site, and the user finds the site down or shows a warning, it will result in having dissatisfied users.

Moreover, if the downtime or warning is due to a security issue, it will also hurt your brand image.

As we worked on improving the SSL certificate monitoring functionality in Sematext Synthetics, our synthetic monitoring solution, we learned a lot about how browsers and other clients handle SSL certificates and the errors caused by invalid certificates. So in this post, I will share a list of the most common SSL certificate errors that can cause the browser to block your website and tips on how to prevent or fix them. I will also show how to use Sematext Synthetics to monitor the SSL certificates of your website.

What Is an SSL/TLS Certificate?

SSL stands for Secure Sockets Layer, a standard security protocol that enables encrypted communication between a client (web browser) and a server (webserver). Transport Layer Security (TLS) is the successor protocol to SSL.

ssl certificate problem

SSL certificates are data files hosted by the server that makes SSL encryption possible. They contain the server’s public key and identity. The SSL certificates are digital certificates issued by a legitimate third-party Certificate Authority, confirming the identity of the certificate owner.

Whenever you visit a website whose URL starts with HTTPS, it means the server has SSL enabled. Before the web browser fetches the data from the server, it fetches the SSL certificates to verify the identity of the server.

Why Do You Need an SSL Certificate?

SSL helps to keep sensitive information like usernames, passwords, credit cards, etc. secure by encrypting the data between the client and the server. You need SSL for three reasons: privacy, integrity, and identification.

An SSL certificate helps a browser verify the identity of a website. By using the SSL certificates, the browser can ensure that it is connected to the exact website the user intended to. SSL certificates guarantee that you are the legitimate and verified owner of the website.

Needless to say, you should always stay on top of any SSL error messages you or your site visitors may receive errors concerning your website certificate.

What Is an SSL Certificate Error?

When the browser connects to your secure website, the webserver returns a list of SSL certificates to prove its identity. The browser performs various checks on these SSL certificates. Only when all the checks pass the browser will proceed to show the website to the user.

An SSL certificate error occurs when the browser cannot verify the SSL certificates returned by the server. When the error happens, the browser blocks the website and warns the user that the website cannot be trusted as shown below. These warnings will negatively impact the user’s trust in your website.

The exact checks and error messages shown to the user might vary depending on the browser.

what is an ssl errorexpired certificate error

SSL certificate errors can be caused by a variety of reasons. Here are the most common types of SSL errors and how to prevent or fix them:

1. Expired Certificate

This is the most common cause of SSL certificate errors. This error means that the validity period of the SSL certificate has expired. Every certificate has a validity period. The client will reject certificates that are not within its validity period. The validity periods are usually around one year long. So it is easy to forget to update the certificates before expiry.

The browser performs this check on all the certificates in your chain (leaf, intermediate, and root) for expiry. You should make sure both leaf and intermediate certificates are not expired.

This could also happen when the browser machine’s time is incorrect.

Fix: Update the SSL certificates of your web server with new valid certificates.

Tip: To prevent errors due to expired certificates, make sure you monitor the SSL certificate expiry date and renew the certificates before they expire. Use a certificate manager like AWS Certificate Manager or Let’s Encrypt to automatically update the certificates before expiry.

2. Inactive Certificate

The inactive certificate error occurs when the browser receives an SSL certificate whose validity period has not yet started. Nowadays it is common to use a certificate manager to manage the certificates for your server. The manager will automatically deploy the new certificates whose validity period starts at the time of deployment. If the client machine’s time is 5 minutes behind due to misconfiguration or other reasons, the client will reject the certificate. This is most common in the case of API clients when the client machine’s clock is not in sync.

Fix: Replace the SSL certificate with a new certificate with a valid start time. Make sure the client machine’s clock is in sync with the server.

Tip: To avoid deploying certificates that are not yet active, check the validity start time before deploying the certificate in the server. Also, when using a certificate manager to manage your certificate make sure you get notified about the certificate change along with the details of the new certificate.

3. Certificate lifetime greater than 398 days

Earlier this year, to ensure a secure web environment for the user, CA/B Forum, decided to limit the lifespan of all newly issued certificates to 398 days. Starting from September 1st, 2020, all the major browsers (Google Chrome, Mozilla Firefox, and Apple Safari) will reject certificates issued after this date with a validity period of more than 398 days.

Fix: Replace the certificate with a new certificate, whose validity is less than 398 days.

Tip: With a decreased lifetime of the certificates, you will have to replace the certificates more often. It is recommended to use a certificate manager to manage your certificates. Monitoring your certificate expiry time will help by alerting you before it occurs.

4. Missing Hostname

This error indicates that the hostname of the website is missing from the certificate. To prevent man-in-the-middle attacks, the browser checks if it is talking to the correct server. The browser checks the hostname of the website against the list of hostnames present in the leaf certificate. If there is no match, then the client will assume it is talking to the wrong server, will reject the certificate, and block the connection. The hostname details are present in commonName and subjectAltName (SAN) fields of the leaf certificate.

Fix: While reusing a certificate across multiple websites or sub-domains, make sure the certificates cover the domain names of all the websites.

Tip: Use a wildcards certificate to cover all your subdomains or a SAN certificate to cover multiple hostnames.

5. Invalid/Incomplete Certificate Chain

The invalid or incomplete certificate chain error happens when the browser is not able to establish a valid chain of trust between the certificates of your browser and the list of trusted root certificates.

Every browser maintains a set of trusted root certificates. When the browser receives the certificates from the server, it starts chaining your website certificates until it reaches any of the trusted root certificates. It will try to establish an SSL Chain of Trust – an ordered list of certificates that permit the browser to certify that the website’s server and the certificate authority are trustworthy. If the browser is not able to establish the chain for your certificates, say for example due to missing intermediate certificates, it will reject the certificates.

Fix: Deploy and configure your webserver to return the leaf certificate and all intermediate certificates.

Tip: To prevent certificate chain error due to missing intermediate certificates, always deploy the leaf and all the intermediate certificates in your server.

6. Revoked Certificate

This error happens when any of the leaf or intermediate certificates of your website is revoked and present in the revoked certificates list.

The certificate authority will revoke certificates that are compromised before their expiry. The Certificate Authority maintains a list of revoked certificates in the Certificate Revocation List (CRL). While loading the website, the browser checks if any of the certificates in the chain is present in CRL. If any of the certificates in your chain is present in CRL, the browser will reject your certificates. Each browser has a different mechanism to verify the revocation status of the certificates.

To check the revocation status of your certificates, you need to either periodically query the CRL or use Online Certificate Status Protocol (OCSP) to check for the certificate status. These mechanisms are difficult to implement.

Fix: Replace the revoked certificate with a new certificate. Also, investigate the reason for certificate revocation.

Tip: You can use SSL certificate monitoring tools like the Sematext Synthetics Browser monitor that uses a real Google Chrome browser to monitor your website. The browser checks the revocation status of your website certificates and alerts you when the certificate is present in the browser’s CRL.

This error means that the browser cannot find the root certificate in the local trusted certificate store. While establishing the SSL Chain of Trust if the browser cannot find any locally trusted root certificates, then it will not trust the server’s certificate. Using self-signed certificates will also cause this issue since the browser cannot trust them.

Fix: If you want to use a self-signed certificate for your website then manually add the certificate to the browser’s trust store.

Tip: To avoid this always ensure you buy your certificates from a reliable certificate authority. For example, at Sematext we used to get them from Digicert, and then we switched to AWS Certificate Manager. Digicert worked flawlessly for us, but we switched to AWS Certificate Manager. Given that we already use AWS this simplified our management by eliminating one extra vendor, plus it was completely free.

8. Insecure Signature Algorithm

The insecure SSL warning appears when any of the SSL certificates returned by your web server uses the old deprecated SHA-1 hashing algorithm.

The strength of the hashing function used to sign the certificate plays an important role in the strength of the certificate security. Some of the older certificates rely on the SHA-1 hashing function, which is now considered insecure. Modern browsers block websites with leaf and intermediate certificates that have the SHA-1 hashing signature.

Fix: SHA-1 certificates are no longer issued by certificate authorities. If you have any servers running with SHA-1 certificates it is recommended to get a new certificate.

9. Missing/Incorrect Certificate Transparency Information

Certificate Transparency is a mechanism that makes it possible to detect SSL certificates that have been mistakenly issued by a certificate authority or maliciously acquired from an otherwise unimpeachable certificate authority. It also makes it possible to identify certificate authorities that have gone rogue and are maliciously issuing certificates. The certificate authority updates the certificate transparency log whenever they issue a certificate.

When a client connects, the server responds with the certificates and the Signed Certificate Timestamp (SCT) for the certificate. SCT is the record for the certificate in the certificate transparency log. If SCT is missing, or incorrect, the browser will reject the certificate.

Tip: To prevent certificate transparency issues, make sure you buy the certificate from a reliable certificate authority.

Monitoring Your SSL Certificates

The best thing you can do to avoid SSL certificate issues is to monitor them.

We learned about all these SSL certificate errors while adding SSL certificate monitoring functionality to Sematext Synthetics, our synthetic monitoring solution that measures the functionality, availability, and performance of your APIs and websites. If you want to see how it compares to other similar services available on the market, check out our SSL monitoring tools comparison.

You can monitor the SSL certificates of your websites using the Sematext Synthetics Browser monitor. The Browser monitor performs the following SSL certificate checks on all the certificates in the chain – the leaf, intermediate, and root certificates.

  • Certificate Validation – Check the validity of the SSL certificates of your websites. The monitor uses an actual Google Chrome browser to load your websites like your user. This will catch all the errors mentioned above and will alert you immediately before your end-user sees it.
  • Certificate Expiry – Check the expiry time of the certificates every day and alert you 28, 14, 7, and 3 days before the expiry.
  • Certificate Change – Check for certificate change every 10 minutes and alert you on detecting any changes, with a detailed change report.

Synthetics also provides an SSL certificate report, with details of all the certificates in the chain, as seen below.

ssl certificate issues

Sematext Synthetics alerts you via multiple channels like PageDuty, Telegram, Slack, Email, etc.

how to detect ssl certificates errors

For more information on Sematext Synthetics SSL certificate monitoring capabilities, check out our SSL/TLS certificate monitoring documentation. Or, you can check out our short video on Synthetic Monitoring with Sematext below.

If you’re interested in improving the overall performance of your website and ensuring the absolute best experience for your users, we recommend you go beyond monitoring your SSL certificates and opt for a tool with multiple functionalities. Here are a few blog posts that we wrote to help you out:

  • Best Website Performance Monitoring Tools
  • Best Website Speed Testing Tools
  • Best Website Uptime Monitoring Tools
  • Best Synthetic Monitoring Tools

Понравилась статья? Поделить с друзьями:
  • Error ssl bypass verify the game files via steam перевод
  • Error ssh version 2 requires a encryption 3des aes activation key
  • Error ssh error data could not be sent to the remote host
  • Error srs mps скачать
  • Error srs asx скачать приложение