Получение SSL-сертификата для хоста с помощью ACME
ServBay поддерживает использование протокола ACME для автоматического получения SSL-сертификатов для хоста, что является удобным и безопасным способом управления SSL-сертификатами. Однако использование метода ACME требует выполнения некоторых предварительных условий. Нужно убедиться, что ваша локальная машина доступна из Интернета, а порты 80 и 443 открыты, и домен правильно указывает на локальную машину. В этой статье будет показано, как использовать метод ACME для получения SSL-сертификата в ServBay.
TIP
По умолчанию ServBay сначала будет пытаться использовать Let's Encrypt для выпуска сертификата. Если это не удастся, будет автоматически использоваться ZeroSSL.
Предварительные условия
Перед использованием метода ACME для получения SSL-сертификата убедитесь, что выполнены следующие условия:
- Доступность из Интернета: Ваша локальная машина должна быть доступна из Интернета.
- Открытые порты: Убедитесь, что порты 80 (HTTP) и 443 (HTTPS) открыты и доступны.
- Разрешение домена: Ваш домен должен правильно указывать на IP-адрес локальной машины.
Шаг первый: Настройка домена и портов
Разрешение домена
Убедитесь, что ваш домен (например,
servbay.demo
) правильно указывает на IP-адрес локальной машины. Вы можете сделать это, изменив настройки DNS у вашего доменного поставщика.Открытие портов
Убедитесь, что настройки маршрутизатора и брандмауэра позволяют внешним подключениям к портам 80 и 443. Вы можете проверить, открыты ли порты, с помощью следующей команды:
shsudo lsof -iTCP -sTCP:LISTEN -P | grep ':80\|:443'
1Убедитесь, что в выводе присутствуют порты 80 и 443 в состоянии прослушивания.
Шаг второй: Использование ACME для получения SSL-сертификата в ServBay
Открытие панели управления ServBay
Запустите приложение ServBay и перейдите в панель управления.
Добавление хоста
В панели управления выберите опцию
Хосты
.Выбор метода выпуска SSL-сертификата
В процессе добавления хоста вам будет предложено выбрать метод выпуска SSL-сертификата. Выберите
Caddy
.Ввод адреса электронной почты пользователя
В соответствующее поле введите ваш адрес электронной почты. Этот адрес будет использоваться для получения уведомлений, связанных с SSL-сертификатом.
Настройка домена
В поле для домена введите ваш домен (например,
servbay.demo
).Завершение добавления хоста
Следуйте подсказкам для завершения процесса добавления хоста. В этот момент ServBay с помощью протокола ACME через Caddy автоматически получит и настроит SSL-сертификат для вашего хоста. По умолчанию ServBay сначала будет пытаться использовать Let's Encrypt для выпуска сертификата. Если это не удастся, будет автоматически использоваться ZeroSSL.
Проверка конфигурации
После выполнения вышеперечисленных шагов вы можете проверить конфигурацию, открыв хост в браузере. Если конфигурация верна, в адресной строке браузера должен отображаться значок замка, указывающий на использование доверенного SSL-сертификата.
Заключение
Используя метод ACME, вы можете автоматически получить и настроить SSL-сертификат в ServBay. Этот метод упрощает процесс управления сертификатами и гарантирует, что ваш сайт всегда будет использовать актуальный SSL-сертификат. Помните, что для использования метода ACME ваша локальная машина должна быть доступна из Интернета, порты 80 и 443 должны быть открыты, и домен должен правильно указывать на локальную машину.
Надеемся, что эта статья поможет вам успешно настроить SSL-сертификаты с использованием метода ACME и обеспечить безопасность вашего сайта.