强制HTTPS 怎么配置多个二级域名用主域名证书
强制HTTPS 怎么配置多个二级域名用主域名证书
已经申请了通配符证书
下面代码中怎么添加多个店铺二级域名用同一个证书 比如a.abc.com b.abc.com c.abc.com 都用主域名abc.com 证书
麻烦把代码贴出来 谢谢
admin 已回答
参考多网店多域名的配置
https://www.kancloud.cn/zouhongzhao/magento2-in-action/628431
比如
upstream fastcgi_backend { server unix:/run/php/php7.0-fpm.sock; } map $http_host $MAGE_RUN_CODE { magento2demo.texiaoyao.cn default; magento2demo-zh.texiaoyao.cn cn; } server { listen 80; server_name magento2demo.texiaoyao.cn; set $MAGE_ROOT /var/www/magento2; set $MAGE_MODE developer; set $MAGE_RUN_TYPE store; include /var/www/magento2/nginx.conf.sample; error_log /var/log/magento2/nginx/error.log; } server { listen 80; server_name magento2demo-zh.texiaoyao.cn; set $MAGE_ROOT /var/www/magento2; set $MAGE_MODE developer; set $MAGE_RUN_TYPE store; include /var/www/magento2/nginx.conf.sample; error_log /var/log/magento2/nginx/error.log; }
把里面的server listen 80的内容改成443就行了,加ssl进去
admin 已回答