diff --git a/server/cn/etc/nginx/nginx.conf b/server/cn/etc/nginx/nginx.conf index cd586d7..8dd680f 100644 --- a/server/cn/etc/nginx/nginx.conf +++ b/server/cn/etc/nginx/nginx.conf @@ -715,6 +715,35 @@ http { } } + server { + listen 443 ssl; + listen 80; + + server_name wiot.yimian.xyz; #1 + + root /home/www/wiot; + + index index.php index.html; + client_max_body_size 1000M; + + ssl_certificate /etc/letsencrypt/live/wiot.yimian.xyz/fullchain.pem; #2 + ssl_certificate_key /etc/letsencrypt/live/wiot.yimian.xyz/privkey.pem; #3 + + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 5m; + ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_prefer_server_ciphers on; + error_page 404 = /404.php; + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + } server { listen 443 ssl; diff --git a/server/cn/home/www/wiot/ota/check.php b/server/cn/home/www/wiot/ota/check.php new file mode 100644 index 0000000..6baa4b6 --- /dev/null +++ b/server/cn/home/www/wiot/ota/check.php @@ -0,0 +1,19 @@ + 1)); + else + echo json_encode(array('update' => 0)); + +yimian__log("log_wiot", array("timestamp" => date('Y-m-d H:i:s', time()), "ip" => ip2long(get_ip()), "version" => $version /* 经md5不可逆加密,仅用于区分用户 */)); + + die(); +} + +echo "This Page is only for wIoT OTA!!"; \ No newline at end of file diff --git a/server/cn/home/www/wiot/ota/get.php b/server/cn/home/www/wiot/ota/get.php new file mode 100644 index 0000000..5038435 --- /dev/null +++ b/server/cn/home/www/wiot/ota/get.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/server/cn/home/www/wiot/ota/wiot.bin b/server/cn/home/www/wiot/ota/wiot.bin new file mode 100644 index 0000000..f8cc0f6 Binary files /dev/null and b/server/cn/home/www/wiot/ota/wiot.bin differ