server {
        listen       80;
        listen       [::]:80;
        server_name  www.scnict.com;
        rewrite ^(.*) https://$server_name$1 permanent;
}

server {
        listen       443 ssl http2 default_server;
        listen       [::]:443 ssl http2 default_server;
        server_name  www.scnict.com;
        root         /var/www/html;

        ssl_certificate "cert/9659689_www.scnict.com.pem";
        ssl_certificate_key "cert/9659689_www.scnict.com.key";
        ssl_session_cache shared:SSL:1m;
        ssl_session_timeout  10m;
        ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers on;
        location ~ \.*gz {
            add_header Content-Encoding 'gzip';
        }

        location /api/ {
           proxy_pass http://127.0.0.1:7200/;
        }
	
	location /download {
	    alias /root/download;
	    autoindex on;
	}


	location /apitest/ {
	   proxy_pass http://127.0.0.1:19000/;
	}

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        }
}
