Everything for me
  • Home
  • SERVER
  • News
  • Hackintosh
  • HTML CSS
  • National
  • Culture
  • Opinion
  • Lifestyle
  • Sports
No Result
View All Result
  • Home
  • SERVER
  • News
  • Hackintosh
  • HTML CSS
  • National
  • Culture
  • Opinion
  • Lifestyle
  • Sports
No Result
View All Result
Everything for me
No Result
View All Result
Home SERVER

Cài SSL Cho Domain Trong VestaCP Với Let’s Encrypt

thanghach by thanghach
26/02/2021
in SERVER
1
Cài SSL Cho Domain Trong VestaCP Với Let’s Encrypt
0
SHARES
15
VIEWS
Share on FacebookShare on Twitter

Đây là bài viết mới trong series bài viết hướng dẫn sử dụng VestaCP. Trong bài này mình sẽ hướng dẫn các bạn cài đặt SSL Let’s Encrypt cho trang quản trị VestaCP

Cấu hình SSL

Để cài đặt SSL Let’s Encrypt cho trang quản trị VestaCP, bạn cần login vào server thông qua SSH với quyền root và chạy lệnh

# yum install -y git

# cd /opt/

# git clone https://github.com/letsencrypt/letsencrypt 

# cd letsencrypt/

Ở trên mình lưu Let’s Encrypt ở thư mục /opt/letsencrypt nên sau này cần chạy lệnh letsencrypt thì nhớ cd vào thư mục này.

Bây giờ chúng ta tạm tắt NGINX và Apache.

# service nginx stop

# service httpd stop

Và tạo chứng chỉ SSL từ Let’s Encrypt cho hostname của mình, trong bài mình dùng hostname là tailieu.tgs.com.vn, nhớ thay lại thành hostname của bạn

# ./letsencrypt-auto certonly --standalone -d tailieu.tgs.com.vn

Trong lúc cài, nó sẽ hỏi bạn điền email (email để khôi phục chứng chỉ nếu bị mất) và đồng ý điều khoản sử dụng. Chọn Angree và Enter.

cài đặt SSL cho vestaCP

Bật tính năng tự động gia hạn chứng chỉ vì mặc định Let’s Encrypt sẽ hết hạn chứng chỉ trong 3 tháng

# cd /opt/letsencrypt

# ./letsencrypt-auto renew
cài đặt SSL cho vestacp 2

Khi tạo xong chứng chỉ của bạn sẽ nằm ở thư mục /etc/letsencrypt/live/tailieu.tgs.com.vn bao gồm cert.pem, privkey.pem

Bước cuối cùng là tạo một cái symbolic link các tập tin chứng chỉ này thay thế chi 2 tập tin chứng chỉ tự tạo của VestaCP tại thư mục /usr/local/vesta/ssl

# rm -rf /usr/local/vesta/ssl/certificate.crt

# ln -s /etc/letsencrypt/live/tailieu.tgs.com.vn/cert.pem /usr/local/vesta/ssl/certificate.crt

# rm -rf /usr/local/vesta/ssl/certificate.key

# ln -s /etc/letsencrypt/live/tailieu.tgs.com.vn/privkey.pem /usr/local/vesta/ssl/certificate.key

Cuối cùng là khởi động lại VestaCP

# service vesta restart

Bây giờ hãy thử truy cập vào trang quản trị VestaCP bằng hostname nhé. Ví dụ: tailieu.tgs.com.vn:8083 và bạn đã có chứng chỉ SSL hợp lệ

cài đặt SSL cho vestaCP 3

Lời kết

Như vậy ta đã hoàn tất cài đặt SSL Let’s Encrypt cho trang quản trị VestaCP, trong các bài viết tiếp theo mính sẽ hướng dẫn các bạn chia gói host trong VestaCP. Chúc các bạn thành công

 

 

thanghach

thanghach

Related Posts

Cài MEMCAHED và ZEND OPCACHE cho VestaCP
SERVER

Cài MEMCAHED và ZEND OPCACHE cho VestaCP

26/02/2021

Comments 1

  1. A WordPress Commenter says:
    2 months ago

    Hi, this is a comment.
    To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
    Commenter avatars come from Gravatar.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow Us

  • 21.8M Fans
  • 81 Followers

Recommended

Google tracks location data even when users turn service off

4 months ago

Ngurah Rai International Airport To Close For 24 Hours For Nyepi

3 months ago

More than 70,000 homeless after deadly Lombok quake

4 months ago

Indonesia Urges Olympic Council of Asia to Promote 2018 Asian Games

4 months ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • Culture
  • Hackintosh
  • HTML CSS
  • Lifestyle
  • National
  • News
  • Opinion
  • SERVER
  • Sports
  • Travel
  • World

Topics

2018 FIFA World Cup 2018 League Asian Games 2018 Balinese Culture Bali United Budget Travel Chopper Bike Istana Negara Market Stories National Exam Opencore SCSS Visit Bali
No Result
View All Result

Highlights

China To Build Indonesia’s Longest Bridge In North Kalimantan

Indonesia Among Top 10 Destinations For Chinese Tourists In 2017

Th-scss-npm

Ngurah Rai International Airport To Close For 24 Hours For Nyepi

The Chinese smartphone upstarts taking on Apple and Samsung

Presidential Train Now Available For Jakartans Traveling To Bandung

Trending

Cài SSL Cho Domain Trong VestaCP Với Let’s Encrypt
SERVER

Cài SSL Cho Domain Trong VestaCP Với Let’s Encrypt

by thanghach
26/02/2021
1

Đây là bài viết mới trong series bài viết hướng dẫn sử dụng VestaCP. Trong bài này mình...

Hướng dẫn cài dual boot windows và hackintosh trên 2 ổ cứng khác nhau

Hướng dẫn cài dual boot windows và hackintosh trên 2 ổ cứng khác nhau

28/01/2021
Cài MEMCAHED và ZEND OPCACHE cho VestaCP

Cài MEMCAHED và ZEND OPCACHE cho VestaCP

26/02/2021

China To Build Indonesia’s Longest Bridge In North Kalimantan

27/11/2020

Indonesia Among Top 10 Destinations For Chinese Tourists In 2017

26/11/2020
Everything for me

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • Cài SSL Cho Domain Trong VestaCP Với Let’s Encrypt 29/12/2020
  • Hướng dẫn cài dual boot windows và hackintosh trên 2 ổ cứng khác nhau 29/11/2020
  • Cài MEMCAHED và ZEND OPCACHE cho VestaCP 28/11/2020

Categories

  • Culture
  • Hackintosh
  • HTML CSS
  • Lifestyle
  • National
  • News
  • Opinion
  • SERVER
  • Sports
  • Travel
  • World

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home
  • Hackintosh
  • News
  • HTML CSS
  • Culture
  • National
  • Sports
  • Lifestyle
  • Travel
  • Opinion

© 2021 JNews - Premium WordPress news & magazine theme by Jegtheme.