server { listen 443 ssl; server_name **.com; #证书绑定的网站域名 ssl_certificate **.pem; #证书公钥 ssl_certificate_key **.key; #证书私钥 ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!3DES:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; charset UTF-8; location / { root /data/course; try_files $uri $uri/ /index.html; index index.html index.htm; } location /MP_verify_QgItFg0F1yc8ZH0c.txt { alias /data/course/MP_verify_QgItFg0F1yc8ZH0c.txt; } }
通过域名 https://**.com/MP_verify_QgItFg0F1yc8ZH0c.txt 就可以直接访问,如果访问403可能没有权限,需要给文件目录读取权限