server { listen 80; server_name 825407762.com www.825407762.com; index index.html index.php; root /alidata/www; location / { return 301 https://$server_name$request_uri; } } server { listen 443 ssl; server_name 825407762.com www.825407762.com; index index.html index.php; root /alidata/www; autoindex on;#自动显示目录 autoindex_exact_size off;#人性化方式显示文件大小否则以byte显示 autoindex_localtime on;#按服务器时间显示,否则以gmt时间显示 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; ssl_prefer_server_ciphers On; ssl_certificate /etc/letsencrypt/archive/825407762.com/fullchain1.pem; ssl_certificate_key /etc/letsencrypt/archive/825407762.com/privkey1.pem; ssl_session_cache shared:SSL:128m; add_header Strict-Transport-Security "max-age=31557600; includeSubDomains"; ssl_stapling on; ssl_stapling_verify on; location ^~ /.git { return 403; } location ~ .*\.(php|php5)?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; } access_log /alidata/log/nginx/access/www.log; }