Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl 生成 ssl 证书 #93

Open
hsipeng opened this issue May 12, 2020 · 0 comments
Open

ssl 生成 ssl 证书 #93

hsipeng opened this issue May 12, 2020 · 0 comments

Comments

@hsipeng
Copy link
Owner

hsipeng commented May 12, 2020

nginx 安装

sudo apt get install nginx

nginx 配置

server {
    listen 80 default;
    server_name domain;
    location / {
        root   /var/www/html;
        index  index.html index.htm;
    };
}

server {
    listen 443 ssl;
    server_name domain;
    ssl_certificate /etc/ssl/domain.crt;
    ssl_certificate_key /etc/ssl/domain.key;
    location / {
        root   /var/www/html;
        index  index.html index.htm;
    };
}

域名ssl配置

生成配置文件
./getssl -c domain
修改配置文件
.getssl/getssl.cfg

CA="https://acme-v01.api.letsencrypt.org"
ACCOUNT_EMAIL="xx@xxx"

.getssl/domain/getssl.cfg

ACL=(‘/var/www/html/.well-known/acme-challenge’)
DOMAIN_CERT_LOCATION=”/etc/ssl/domain.crt”
DOMAIN_KEY_LOCATION=”/etc/ssl/domain.key”
CA_CERT_LOCATION=”/etc/ssl/chain.crt”

生成证书
90 天更新
./getssl -d lirawx.live

参考

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant