群主帮我看看怎么添加多个店铺二级域名 比如a.abc.com b.abc.com c.abc.com ............ 我已经申请了通配符SSL证书
群主帮我看看怎么添加多个店铺二级域名 比如a.abc.com b.abc.com c.abc.com ............ 我已经申请了通配符SSL证书
我已经申请了www.abc.com通配符SSL证书
下面代码中怎么添加多个店铺二级域名 比如a.abc.com b.abc.com c.abc.com ............
强制HTTPS
只有SSL,没安装Varnish的情况下
Nginx配置文件
server
server
<span class="token punctuation">{</span>
listen <span class="token number">80</span><span class="token punctuation">;</span>
listen <span class="token number">443</span> ssl http2<span class="token punctuation">;</span>
server_name yourdomain<span class="token punctuation">.</span>com www<span class="token punctuation">.</span>yourdomain<span class="token punctuation">.</span>com<span class="token punctuation">;</span>
index index<span class="token punctuation">.</span>php index<span class="token punctuation">.</span>html index<span class="token punctuation">.</span>htm default<span class="token punctuation">.</span>php default<span class="token punctuation">.</span>htm default<span class="token punctuation">.</span>html<span class="token punctuation">;</span>
set $MAGE_ROOT <span class="token operator">/</span>var<span class="token operator">/</span>www<span class="token operator">/</span>magento2<span class="token operator">-</span>live<span class="token operator">/</span><span class="token punctuation">;</span>
set $MAGE_MODE production<span class="token punctuation">;</span>
set $MAGE_RUN_TYPE store<span class="token punctuation">;</span>
include <span class="token operator">/</span>var<span class="token operator">/</span>www<span class="token operator">/</span>magento2<span class="token operator">-</span>live<span class="token operator">/</span>nginx<span class="token punctuation">.</span>conf<span class="token punctuation">.</span>sample<span class="token punctuation">;</span>
#SSL<span class="token operator">-</span>START
#error_page <span class="token number">404</span><span class="token operator">/</span><span class="token number">404.</span>html<span class="token punctuation">;</span>
#HTTP_TO_HTTPS_START
<span class="token keyword">if</span> <span class="token punctuation">(</span>$server_port <span class="token operator">!</span><span class="token operator">~</span> <span class="token number">443</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
rewrite <span class="token operator">^</span><span class="token punctuation">(</span><span class="token operator">/</span><span class="token punctuation">.</span><span class="token operator">*</span><span class="token punctuation">)</span>$ https<span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>$host$<span class="token number">1</span> permanent<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
#HTTP_TO_HTTPS_END
ssl_certificate <span class="token operator">/</span>etc<span class="token operator">/</span>nginx<span class="token operator">/</span>ssl<span class="token operator">/</span>magento2<span class="token operator">/</span>ssl<span class="token operator">-</span>cert<span class="token operator">-</span>snakeoil<span class="token punctuation">.</span>pem<span class="token punctuation">;</span> #change with your SSL cert
ssl_certificate_key <span class="token operator">/</span>etc<span class="token operator">/</span>nginx<span class="token operator">/</span>ssl<span class="token operator">/</span>magento2<span class="token operator">/</span>ssl<span class="token operator">-</span>cert<span class="token operator">-</span>snakeoil<span class="token punctuation">.</span>key<span class="token punctuation">;</span> # change with your SSL key
ssl_protocols TLSv1 TLSv1<span class="token punctuation">.</span><span class="token number">1</span> TLSv1<span class="token punctuation">.</span><span class="token number">2</span><span class="token punctuation">;</span>
ssl_ciphers ECDHE<span class="token operator">-</span>RSA<span class="token operator">-</span>AES128<span class="token operator">-</span>GCM<span class="token operator">-</span>SHA256<span class="token punctuation">:</span>HIGH<span class="token punctuation">:</span><span class="token operator">!</span>aNULL<span class="token punctuation">:</span><span class="token operator">!</span>MD5<span class="token punctuation">:</span><span class="token operator">!</span>RC4<span class="token punctuation">:</span><span class="token operator">!</span>DHE<span class="token punctuation">;</span>
ssl_prefer_server_ciphers on<span class="token punctuation">;</span>
ssl_session_cache shared<span class="token punctuation">:</span>SSL<span class="token punctuation">:</span><span class="token number">10</span>m<span class="token punctuation">;</span>
ssl_session_timeout <span class="token number">10</span>m<span class="token punctuation">;</span>
#SSL<span class="token operator">-</span>END
<span class="token punctuation">}</span>
chiina 已回答
代码先复制到记事本去掉html标签,再复制到这里