关于 只配置SSL的问题
关于 只配置SSL的问题
只配置SSL, SSL的 key之类文件已获取,按照教程的 /etc/nginx/sites-enabled/ 这个目录下 有 2个文件 default 和 magento2
1.请问是两个文件都 一样 vim 配置一下代码吗
server{ listen 80; listen 443 ssl http2; server_name yourdomain.com www.yourdomain.com; index index.php index.html index.htm default.php default.htm default.html; set $MAGE_ROOT /var/www/magento2-live/; set $MAGE_MODE production; set $MAGE_RUN_TYPE store; include /var/www/magento2-live/nginx.conf.sample; #SSL-START #error_page 404/404.html; #HTTP_TO_HTTPS_START if ($server_port !~ 443){ rewrite ^(/.*)$ https://$host$1 permanent; } #HTTP_TO_HTTPS_END ssl_certificate /etc/nginx/ssl/magento2/ssl-cert-snakeoil.pem; #change with your SSL cert ssl_certificate_key /etc/nginx/ssl/magento2/ssl-cert-snakeoil.key; # change with your SSL key ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; #SSL-END}
2.需要清空 这两个配置文件 ,再复制这些文件下去,还是直接替换 ?