let's enscript 自动续安全证书失败
www.eyeglassespro.com 我用的是magento 2.5程序, 配置文件如下:#If enable elastic search, then remove #, by Henry Zhan --- www.cheapglasses123.com
#upstream fastcgi_backend {
# server unix:/tmp/php-cgi.sock;
#}
server
{
listen 443 ssl http2;
#listen [::]:443 ssl http2;
server_name www.eyeglassespro.com eyeglassespro.com;
index index.php;
set $MAGE_ROOT /home/wwwroot/www.eyeglassespro.com;
root $MAGE_ROOT/pub;
ssl_certificate /usr/local/nginx/conf/ssl/www.eyeglassespro.com/fullchain.cer;
ssl_certificate_key /usr/local/nginx/conf/ssl/www.eyeglassespro.com/www.eyeglassespro.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
ssl_session_cache builtin:1000 shared:SSL:10m;
# openssl dhparam -out /usr/local/nginx/conf/ssl/dhparam.pem 2048
ssl_dhparam /usr/local/nginx/conf/ssl/dhparam.pem;
autoindex off;
charset UTF-8;
error_page 404 403 = /errors/404.php;
#add_header "X-UA-Compatible" "IE=Edge";
# Deny access to sensitive files
location /.user.ini {
deny all;
}
# PHP entry point for setup application
location ~* ^/setup($|/) {
root $MAGE_ROOT;
location ~ ^/setup/index.php {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_paramPHP_FLAG"session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_paramPHP_VALUE "memory_limit=756M \n max_execution_time=600";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/setup/(?!pub/). {
deny all;
}
location ~ ^/setup/pub/ {
add_header X-Frame-Options "SAMEORIGIN";
}
}
# PHP entry point for update application
location ~* ^/update($|/) {
root $MAGE_ROOT;
location ~ ^/update/index.php {
fastcgi_split_path_info ^(/update/index.php)(/.+)$;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
fastcgi_paramPATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
# Deny everything but index.php
location ~ ^/update/(?!pub/). {
deny all;
}
location ~ ^/update/pub/ {
add_header X-Frame-Options "SAMEORIGIN";
}
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
proxy_ssl_session_reuse off;
limit_req zone=allips burst=5 nodelay;
}
location /catalogsearch/ {
limit_req zone=search burst=1 nodelay;
try_files $uri $uri/ /index.php?$args;
}
location /pub/ {
location ~ ^/pub/media/(downloadable|customer|import|custom_options|theme_customization/.*\.xml) {
deny all;
}
alias $MAGE_ROOT/pub/;
add_header X-Frame-Options "SAMEORIGIN";
}
location /static/ {
# Uncomment the following line in production mode
# expires max;
# Remove signature of the static files that is used to overcome the browser cache
location ~ ^/static/version {
rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2|html|json)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
}
if (!-f $request_filename) {
rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last;
}
add_header X-Frame-Options "SAMEORIGIN";
}
location /media/ {
## The following section allows to offload image resizing from Magento instance to the Nginx.
## Catalog image URL format should be set accordingly.
## See https://docs.magento.com/user-guide/configuration/general/web.html#url-options
# location ~* ^/media/catalog/.* {
#
# # Replace placeholders and uncomment the line below to serve product images from public
# # See examples of S3 authentication at https://github.com/anomalizer/ngx_aws_auth
# # resolver 8.8.8.8;
# # proxy_pass https://<bucket-name>.<region-name>.amazonaws.com;
#
# set $width "-";
# set $height "-";
# if ($arg_width != '') {
# set $width $arg_width;
# }
# if ($arg_height != '') {
# set $height $arg_height;
# }
# image_filter resize $width $height;
# image_filter_jpeg_quality 90;
# }
try_files $uri $uri/ /get.php$is_args$args;
location ~ ^/media/theme_customization/.*\.xml {
deny all;
}
location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
add_header Cache-Control "public";
add_header X-Frame-Options "SAMEORIGIN";
expires +1y;
try_files $uri $uri/ /get.php$is_args$args;
}
location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
add_header Cache-Control "no-store";
add_header X-Frame-Options "SAMEORIGIN";
expires off;
try_files $uri $uri/ /get.php$is_args$args;
}
add_header X-Frame-Options "SAMEORIGIN";
}
location /media/customer/ {
deny all;
}
location /media/downloadable/ {
deny all;
}
location /media/import/ {
deny all;
}
location /media/custom_options/ {
deny all;
}
location /errors/ {
location ~* \.xml$ {
deny all;
}
}
# PHP entry point for main application
location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ {
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_paramPHP_FLAG"session.auto_start=off \n suhosin.session.cryptua=off";
fastcgi_paramPHP_VALUE "memory_limit=756M \n max_execution_time=18000";
fastcgi_read_timeout 600s;
fastcgi_connect_timeout 600s;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
include fastcgi_params;
}
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/xml+rss
image/svg+xml;
gzip_vary on;
# Banned locations (only reached if the earlier PHP entry point regexes don't match)
location ~* (\.php$|\.phtml$|\.htaccess$|\.git) {
deny all;
}
include enable-php.conf;
access_log/home/wwwlogs/www.eyeglassespro.com.log;
}
server {
listen 80;
server_name www.eyeglassespro.com eyeglassespro.com;
rewrite ^(.*)$ https://${server_name}$1 permanent;
}
====================
军哥, 安全证书前2天到期了, 不能自动续, 请问如何处理呀。 谢谢了。
我操作lnmp ssl add, 出错信息如下:
Running cmd: issue
_main_domain='www.eyeglassespro.com'
_alt_domains='eyeglassespro.com'
Using config home:/usr/local/acme.sh
default_acme_server
ACME_DIRECTORY='https://acme-v02.api.letsencrypt.org/directory'
DOMAIN_PATH='/usr/local/nginx/conf/ssl/www.eyeglassespro.com'
Using ACME_DIRECTORY: https://acme-v02.api.letsencrypt.org/directory
_init api for server: https://acme-v02.api.letsencrypt.org/directory
GET
url='https://acme-v02.api.letsencrypt.org/directory'
timeout=
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
ret='0'
ACME_KEY_CHANGE='https://acme-v02.api.letsencrypt.org/acme/key-change'
ACME_NEW_AUTHZ
ACME_NEW_ORDER='https://acme-v02.api.letsencrypt.org/acme/new-order'
ACME_NEW_ACCOUNT='https://acme-v02.api.letsencrypt.org/acme/new-acct'
ACME_REVOKE_CERT='https://acme-v02.api.letsencrypt.org/acme/revoke-cert'
ACME_AGREEMENT='https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf'
ACME_NEW_NONCE='https://acme-v02.api.letsencrypt.org/acme/new-nonce'
Using CA: https://acme-v02.api.letsencrypt.org/directory
_on_before_issue
_chk_main_domain='www.eyeglassespro.com'
_chk_alt_domains='eyeglassespro.com'
Le_LocalAddress
d='www.eyeglassespro.com'
Check for domain='www.eyeglassespro.com'
_currentRoot='www.eyeglassespro.com'
d='eyeglassespro.com'
Check for domain='eyeglassespro.com'
_currentRoot='www.eyeglassespro.com'
d
_saved_account_key_hash is not changed, skip register account.
Read key length:
Creating domain key
Use DEFAULT_DOMAIN_KEY_LENGTH=2048
Using config home:/usr/local/acme.sh
ACME_DIRECTORY='https://acme-v02.api.letsencrypt.org/directory'
Use length 2048
Using RSA: 2048
The domain key is here: [1;32m/usr/local/nginx/conf/ssl/www.eyeglassespro.com/www.eyeglassespro.com.key[0m
_createcsr
Multi domain='DNS:www.eyeglassespro.com,DNS:eyeglassespro.com'
Getting domain auth token for each domain
d='eyeglassespro.com'
d
url='https://acme-v02.api.letsencrypt.org/acme/new-order'
payload='{"identifiers": [{"type":"dns","value":"www.eyeglassespro.com"},{"type":"dns","value":"eyeglassespro.com"}]}'
RSA key
HEAD
_post_url='https://acme-v02.api.letsencrypt.org/acme/new-nonce'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g-I'
_ret='0'
POST
_post_url='https://acme-v02.api.letsencrypt.org/acme/new-order'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
_ret='0'
code='201'
Le_LinkOrder='https://acme-v02.api.letsencrypt.org/acme/order/114724297/10158498943'
Le_OrderFinalize='https://acme-v02.api.letsencrypt.org/acme/finalize/114724297/10158498943'
url='https://acme-v02.api.letsencrypt.org/acme/authz-v3/13691496603'
payload
POST
_post_url='https://acme-v02.api.letsencrypt.org/acme/authz-v3/13691496603'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
_ret='0'
code='200'
url='https://acme-v02.api.letsencrypt.org/acme/authz-v3/13691496604'
payload
POST
_post_url='https://acme-v02.api.letsencrypt.org/acme/authz-v3/13691496604'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
_ret='0'
code='200'
d='www.eyeglassespro.com'
Getting webroot for domain='www.eyeglassespro.com'
_w='www.eyeglassespro.com'
_currentRoot='www.eyeglassespro.com'
entry='"type":"http-01","status":"pending","url":"https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g","token":"ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38"'
token='ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38'
uri='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
keyauthorization='ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38.XDGnNDeZCG-q4Bh49vrE86kYo0Mb5MYNzYgVIf4Ur9U'
dvlist='www.eyeglassespro.com#ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38.XDGnNDeZCG-q4Bh49vrE86kYo0Mb5MYNzYgVIf4Ur9U#https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g#http-01#www.eyeglassespro.com'
d='eyeglassespro.com'
Getting webroot for domain='eyeglassespro.com'
_w='www.eyeglassespro.com'
_currentRoot='www.eyeglassespro.com'
entry='"type":"http-01","status":"pending","url":"https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496603/HQ4xJg","token":"sKYqDOK4AmAnoYAAQN2-BaiUvjO-vKsj3kDsAgKiFdY"'
token='sKYqDOK4AmAnoYAAQN2-BaiUvjO-vKsj3kDsAgKiFdY'
uri='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496603/HQ4xJg'
keyauthorization='sKYqDOK4AmAnoYAAQN2-BaiUvjO-vKsj3kDsAgKiFdY.XDGnNDeZCG-q4Bh49vrE86kYo0Mb5MYNzYgVIf4Ur9U'
dvlist='eyeglassespro.com#sKYqDOK4AmAnoYAAQN2-BaiUvjO-vKsj3kDsAgKiFdY.XDGnNDeZCG-q4Bh49vrE86kYo0Mb5MYNzYgVIf4Ur9U#https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496603/HQ4xJg#http-01#www.eyeglassespro.com'
d
vlist='www.eyeglassespro.com#ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38.XDGnNDeZCG-q4Bh49vrE86kYo0Mb5MYNzYgVIf4Ur9U#https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g#http-01#www.eyeglassespro.com,eyeglassespro.com#sKYqDOK4AmAnoYAAQN2-BaiUvjO-vKsj3kDsAgKiFdY.XDGnNDeZCG-q4Bh49vrE86kYo0Mb5MYNzYgVIf4Ur9U#https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496603/HQ4xJg#http-01#www.eyeglassespro.com,'
d='www.eyeglassespro.com'
d='eyeglassespro.com'
ok, let's start to verify
Verifying: www.eyeglassespro.com
d='www.eyeglassespro.com'
keyauthorization='ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38.XDGnNDeZCG-q4Bh49vrE86kYo0Mb5MYNzYgVIf4Ur9U'
uri='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
_currentRoot='www.eyeglassespro.com'
wellknown_path='www.eyeglassespro.com/.well-known/acme-challenge'
writing token:ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38 to www.eyeglassespro.com/.well-known/acme-challenge/ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38
Changing owner/group of .well-known to root:root
url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
payload='{}'
POST
_post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
_ret='0'
code='200'
trigger validation code: 200
sleep 2 secs to verify
checking
url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
payload
POST
_post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
_ret='0'
code='200'
Pending
sleep 2 secs to verify
checking
url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
payload
POST
_post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
_ret='0'
code='200'
www.eyeglassespro.com:Verify error:Invalid response from https://www.eyeglassespro.com/.well-known/acme-challenge/ZXUOzQ1KVuE2wdd-ZK-XoDfWPBsr6rFhTGDwwmrMN38 :
pid
No need to restore nginx, skip.
_clearupdns
dns_entries
skip dns.
_on_issue_err
Please check log file for more details: /usr/local/acme.sh/acme.sh.log
url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
payload='{}'
POST
_post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496604/0cmL5g'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
_ret='0'
code='400'
url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496603/HQ4xJg'
payload='{}'
POST
_post_url='https://acme-v02.api.letsencrypt.org/acme/chall-v3/13691496603/HQ4xJg'
_CURL='curl --silent --dump-header /usr/local/acme.sh/http.header-L-g '
_ret='0'
code='200'
官网301设置教程上有说明,使用letsencrypt必须要另外的设置 https://lnmp.org/faq/lnmp-nginx-301-rewrite.html
如果不设置无法http验证域名
而且看日志,上面的显示你域名是无法访问的,80、443端口都不通
页:
[1]