server
{
listen 80;
listen 443 ssl http2;
server_name ;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/;
#digitalocean nginx配置
charset utf-8;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
log_not_found off;
types_hash_max_size 2048;
types_hash_bucket_size 64;
client_max_body_size 16M;
#禁止某个人IP访问
#SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
#error_page 404/404.html;
#HTTP_TO_HTTPS_START
if ($server_port !~ 443){
rewrite ^(/.*)$ https://$host$1 permanent;
}复制代码
我这个难道是假的http2?
