Browse Source

first commit

liuxingchen 1 năm trước cách đây
commit
9204c638a7
9 tập tin đã thay đổi với 1142 bổ sung0 xóa
  1. 103 0
      nginx/ca/ca.crt
  2. 27 0
      nginx/ca/test.key
  3. 224 0
      nginx/default.conf
  4. 70 0
      nginx/nginx.conf
  5. 226 0
      nginx/vhost/default.conf
  6. 170 0
      supervisord.d/supervisord.conf
  7. 129 0
      supervisord.d/thread.ini
  8. 115 0
      wwwroot/adminer.php
  9. 78 0
      wwwroot/login.php

+ 103 - 0
nginx/ca/ca.crt

@@ -0,0 +1,103 @@
+-----BEGIN CERTIFICATE-----
+MIIGRjCCBS6gAwIBAgIQDtN8oWTjiYZl5vtkUNlimzANBgkqhkiG9w0BAQsFADCB
+jzELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
+A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTcwNQYDVQQD
+Ey5TZWN0aWdvIFJTQSBEb21haW4gVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENB
+MB4XDTIyMDkwOTAwMDAwMFoXDTIzMDkwOTIzNTk1OVowHzEdMBsGA1UEAwwUKi5z
+dXBlci1zaWdodC5jb20uY24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
+AQCxn8UBUq53qkCssPZQQhg9xI5QXDcvmX0VVnpm7Frz80Mz9AOjd24KD4F5KZKG
+dbliC2WdH4gv7cdcbaAA33l7AoLReBGo+KlDHqAOq7mdyYjEUr7PA/ii8NwpoSff
+q+vPaMwOeCaJt8y0WPpDm8x2+xSH4qVJM9/yIsp0Fd9UQxe5hlvVYB1g4uMomIGr
+wowMLgLCuGADEMt19wBN9wA8NPLz0zQSYrauSV2miKTjGV6kkuKuku0YzC8Z0yGY
+6ZkDbvs5M+oitzRQheIM8I+5oaAfKMBP75sAmGMo/wRYhy9X8oZO6AuY0UeDpy1E
+vi1Lg+28noLKoU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seport;
+        #listen [::]:80 default_server ipv6only=on;
+        server_name _;
+        index index.html index.htm index.php;
+        root  /home/wwwroot/default;
+
+        #error_page   404   /404.html;
+
+        # Deny access to PHP files in specific directory
+        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
+
+        include enable-php.conf;
+
+        location /nginx_status
+        {
+            stub_status on;
+            access_log   off;
+        }
+
+  	location /jikong/readReal {
+    		proxy_pass  http://127.0.0.1:8080/readReal; # 转发规则
+  	}
+
+  	location /jikong/api {
+   		proxy_pass  http://127.0.0.1:8080/api; # 转发规则
+                proxy_read_timeout 600s;
+  	}
+
+  	location /jikong/write {
+    		proxy_pass  http://127.0.0.1:18080/write; # 转发规则
+  	}
+
+  	location /shengna/ {
+    		proxy_pass  http://192.168.1.53:8081/; # 转发规则
+  	}
+
+  	location /shengwu7000/ {
+    		proxy_pass  http://192.168.1.53:7000/; # 转发规则
+  	}
+
+  	location /shengwu8081/ {
+    		proxy_pass  http://192.168.1.53:8081/; # 转发规则
+  	}
+
+  	location /roboot/ {
+    		proxy_pass  http://192.168.1.6:8003/; # 转发规则
+  	}
+
+        location /smWebsocket01 {
+            proxy_pass http://192.168.1.54:8324/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+        location /smWebsocket02 {
+            proxy_pass http://192.168.1.54:8325/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+        location /smWebsocket03 {
+            proxy_pass http://192.168.1.55:8324/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+        location /smWebsocket04 {
+            proxy_pass http://192.168.1.55:8325/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+        location /smWebsocket05 {
+            proxy_pass http://192.168.1.53:8324/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+
+        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
+        {
+            expires      30d;
+        }
+
+        location ~ .*\.(js|css)?$
+        {
+            expires      12h;
+        }
+
+        location ~ /.well-known {
+            allow all;
+        }
+
+        location ~ /\.
+        {
+            deny all;
+        }
+
+        access_log  /home/wwwlogs/access.log;
+    }
+
+
+upstream captureCamera {
+    server 127.0.0.1:8765;
+}
+
+server {
+    listen 7000 ssl;
+    server_name localhost;
+    ssl_certificate     /usr/local/nginx/conf/ca/ca.crt;
+    ssl_certificate_key /usr/local/nginx/conf/ca/test.key;
+    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;
+    
+    location /marinePlatform/v1/devices/frameExtractionSetting {
+        proxy_pass http://captureCamera/marinePlatform/v1/devices/frameExtractionSetting;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+    location /marinePlatform/v2/data/history/ {
+        proxy_pass http://captureCamera/marinePlatform/v2/data/history/;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+    location /marinePlatform/v2/download/history/ {
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+        alias  /home/sencott/imageCapture/HDU/;
+        sendfile on;
+        autoindex on;
+        autoindex_exact_size off;
+        autoindex_localtime on;
+    }
+
+    # 下发平台验证token
+    location /marinePlatform/v1/app/appToken {
+        proxy_pass http://captureCamera/marinePlatform/v1/app/appToken;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+    # 删除摄像头
+    location /marinePlatform/v1/devices/delFrameExtraction {
+        proxy_pass http://captureCamera/marinePlatform/v1/devices/delFrameExtraction;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+    # 设置摄像头图像识别
+    location /marinePlatform/v1/devices/setVideoRecognize {
+        proxy_pass http://captureCamera/marinePlatform/v1/devices/setVideoRecognize;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+}
+

+ 70 - 0
nginx/nginx.conf

@@ -0,0 +1,70 @@
+user  www www;
+
+worker_processes auto;
+worker_cpu_affinity auto;
+
+error_log  /home/wwwlogs/nginx_error.log  crit;
+
+pid        /usr/local/nginx/logs/nginx.pid;
+
+#Specifies the value for maximum file descriptors that can be opened by this process.
+worker_rlimit_nofile 51200;
+
+events
+    {
+        use epoll;
+        worker_connections 51200;
+        multi_accept off;
+        accept_mutex off;
+    }
+
+http
+    {
+        include       mime.types;
+        default_type  application/octet-stream;
+
+        server_names_hash_bucket_size 128;
+        client_header_buffer_size 32k;
+        large_client_header_buffers 4 32k;
+        client_max_body_size 50m;
+
+        sendfile on;
+        sendfile_max_chunk 512k;
+        tcp_nopush on;
+
+        keepalive_timeout 60;
+
+            map $http_upgrade $connection_upgrade {
+		default upgrade;
+		''      close;
+	}
+
+        tcp_nodelay on;
+
+        fastcgi_connect_timeout 300;
+        fastcgi_send_timeout 300;
+        fastcgi_read_timeout 300;
+        fastcgi_buffer_size 64k;
+        fastcgi_buffers 4 64k;
+        fastcgi_busy_buffers_size 128k;
+        fastcgi_temp_file_write_size 256k;
+
+        gzip on;
+        gzip_min_length  1k;
+        gzip_buffers     4 16k;
+        gzip_http_version 1.1;
+        gzip_comp_level 2;
+        gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
+        gzip_vary on;
+        gzip_proxied   expired no-cache no-store private auth;
+        gzip_disable   "MSIE [1-6]\.";
+
+        #limit_conn_zone $binary_remote_addr zone=perip:10m;
+        ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.
+
+        server_tokens off;
+        access_log off;
+
+	include vhost/*.conf;
+}
+

+ 226 - 0
nginx/vhost/default.conf

@@ -0,0 +1,226 @@
+server
+    {
+        listen 80 default_server reuseport;
+        #listen [::]:80 default_server ipv6only=on;
+        server_name _;
+        index index.html index.htm index.php;
+        root  /home/wwwroot/default;
+
+        #error_page   404   /404.html;
+
+        # Deny access to PHP files in specific directory
+        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
+
+        include enable-php.conf;
+
+        location /nginx_status
+        {
+            stub_status on;
+            access_log   off;
+        }
+
+  	location /jikong/readReal {
+    		proxy_pass  http://127.0.0.1:8080/readReal; # 转发规则
+  	}
+
+  	location /jikong/api {
+   		proxy_pass  http://127.0.0.1:8080/api; # 转发规则
+                proxy_read_timeout 600s;
+  	}
+
+  	location /jikong/write {
+    		proxy_pass  http://127.0.0.1:18080/write; # 转发规则
+  	}
+
+  	location /shengna/ {
+    		proxy_pass  http://192.168.1.53:8081/; # 转发规则
+  	}
+
+  	location /shengwu7000/ {
+    		proxy_pass  http://192.168.1.53:7000/; # 转发规则
+  	}
+
+  	location /shengwu8081/ {
+    		proxy_pass  http://192.168.1.53:8081/; # 转发规则
+  	}
+
+  	location /roboot/ {
+    		proxy_pass  http://192.168.1.6:8003/; # 转发规则
+  	}
+
+
+
+        location /smWebsocket01 {
+            proxy_pass http://192.168.1.54:8324/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+        location /smWebsocket02 {
+            proxy_pass http://192.168.1.54:8325/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+        location /smWebsocket03 {
+            proxy_pass http://192.168.1.55:8324/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+        location /smWebsocket04 {
+            proxy_pass http://192.168.1.55:8325/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+        location /smWebsocket05 {
+            proxy_pass http://192.168.1.53:8324/;
+            proxy_http_version 1.1;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_read_timeout 120s;
+
+            proxy_set_header Upgrade websocket;
+            proxy_set_header Connection Upgrade;
+        }
+
+
+        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
+        {
+            expires      30d;
+        }
+
+        location ~ .*\.(js|css)?$
+        {
+            expires      12h;
+        }
+
+        location ~ /.well-known {
+            allow all;
+        }
+
+        location ~ /\.
+        {
+            deny all;
+        }
+
+        access_log  /home/wwwlogs/access.log;
+    }
+
+
+upstream captureCamera {
+    server 127.0.0.1:8765;
+}
+
+server {
+    listen 7000 ssl;
+    server_name localhost;
+    ssl_certificate     /usr/local/nginx/conf/ca/ca.crt;
+    ssl_certificate_key /usr/local/nginx/conf/ca/test.key;
+    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;
+    
+    location /marinePlatform/v1/devices/frameExtractionSetting {
+        proxy_pass http://captureCamera/marinePlatform/v1/devices/frameExtractionSetting;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+    location /marinePlatform/v2/data/history/ {
+        proxy_pass http://captureCamera/marinePlatform/v2/data/history/;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+    location /marinePlatform/v2/download/history/ {
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+        alias  /home/sencott/imageCapture/HDU/;
+        sendfile on;
+        autoindex on;
+        autoindex_exact_size off;
+        autoindex_localtime on;
+    }
+
+    # 下发平台验证token
+    location /marinePlatform/v1/app/appToken {
+        proxy_pass http://captureCamera/marinePlatform/v1/app/appToken;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+    # 删除摄像头
+    location /marinePlatform/v1/devices/delFrameExtraction {
+        proxy_pass http://captureCamera/marinePlatform/v1/devices/delFrameExtraction;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+    # 设置摄像头图像识别
+    location /marinePlatform/v1/devices/setVideoRecognize {
+        proxy_pass http://captureCamera/marinePlatform/v1/devices/setVideoRecognize;
+        proxy_http_version 1.1;
+        proxy_set_header Host            $host;
+        proxy_set_header X-Real-IP       $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        client_max_body_size             200m;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "upgrade";
+        proxy_ignore_client_abort on;
+    }
+}
+

+ 170 - 0
supervisord.d/supervisord.conf

@@ -0,0 +1,170 @@
+; Sample supervisor config file.
+;
+; For more information on the config file, please see:
+; http://supervisord.org/configuration.html
+;
+; Notes:
+;  - Shell expansion ("~" or "$HOME") is not supported.  Environment
+;    variables can be expanded using this syntax: "%(ENV_HOME)s".
+;  - Quotes around values are not supported, except in the case of
+;    the environment= options as shown below.
+;  - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
+;  - Command will be truncated if it looks like a config file comment, e.g.
+;    "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
+;
+; Warning:
+;  Paths throughout this example file use /tmp because it is available on most
+;  systems.  You will likely need to change these to locations more appropriate
+;  for your system.  Some systems periodically delete older files in /tmp.
+;  Notably, if the socket file defined in the [unix_http_server] section below
+;  is deleted, supervisorctl will be unable to connect to supervisord.
+
+[unix_http_server]
+file=/tmp/supervisor.sock   ; the path to the socket file
+;chmod=0700                 ; socket file mode (default 0700)
+;chown=nobody:nogroup       ; socket file uid:gid owner
+;username=user              ; default is no username (open server)
+;password=123               ; default is no password (open server)
+
+; Security Warning:
+;  The inet HTTP server is not enabled by default.  The inet HTTP server is
+;  enabled by uncommenting the [inet_http_server] section below.  The inet
+;  HTTP server is intended for use within a trusted environment only.  It
+;  should only be bound to localhost or only accessible from within an
+;  isolated, trusted network.  The inet HTTP server does not support any
+;  form of encryption.  The inet HTTP server does not use authentication
+;  by default (see the username= and password= options to add authentication).
+;  Never expose the inet HTTP server to the public internet.
+
+[inet_http_server]         ; inet (TCP) server disabled by default
+port=0.0.0.0:10000        ; ip_address:port specifier, *:port for all iface
+username=sencott              ; default is no username (open server)
+password=sea12345               ; default is no password (open server)
+
+[supervisord]
+logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log
+logfile_maxbytes=50MB        ; max main logfile bytes b4 rotation; default 50MB
+logfile_backups=10           ; # of main logfile backups; 0 means none, default 10
+loglevel=debug                ; log level; default info; others: debug,warn,trace
+pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
+nodaemon=false               ; start in foreground if true; default false
+silent=false                 ; no logs to stdout if true; default false
+minfds=1024                  ; min. avail startup file descriptors; default 1024
+minprocs=200                 ; min. avail process descriptors;default 200
+;umask=022                   ; process file creation umask; default 022
+;user=supervisord            ; setuid to this UNIX account at startup; recommended if root
+;identifier=supervisor       ; supervisord identifier, default is 'supervisor'
+;directory=/tmp              ; default is not to cd during start
+;nocleanup=true              ; don't clean up tempfiles at start; default false
+;childlogdir=/tmp            ; 'AUTO' child log dir, default $TEMP
+;environment=KEY="value"     ; key value pairs to add to environment
+;strip_ansi=false            ; strip ansi escape codes in logs; def. false
+
+; The rpcinterface:supervisor section must remain in the config file for
+; RPC (supervisorctl/web interface) to work.  Additional interfaces may be
+; added by defining them in separate [rpcinterface:x] sections.
+
+[rpcinterface:supervisor]
+supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
+
+; The supervisorctl section configures how supervisorctl will connect to
+; supervisord.  configure it match the settings in either the unix_http_server
+; or inet_http_server section.
+
+[supervisorctl]
+serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket
+;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
+;username=chris              ; should be same as in [*_http_server] if set
+;password=123                ; should be same as in [*_http_server] if set
+;prompt=mysupervisor         ; cmd line prompt (default "supervisor")
+;history_file=~/.sc_history  ; use readline history if available
+
+; The sample program section below shows all possible program subsection values.
+; Create one or more 'real' program: sections to be able to control them under
+; supervisor.
+
+;[program:theprogramname]
+;command=/bin/cat              ; the program (relative uses PATH, can take args)
+;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
+;numprocs=1                    ; number of processes copies to start (def 1)
+;directory=/tmp                ; directory to cwd to before exec (def no cwd)
+;umask=022                     ; umask for process (default None)
+;priority=999                  ; the relative start priority (default 999)
+;autostart=true                ; start at supervisord start (default: true)
+;startsecs=1                   ; # of secs prog must stay up to be running (def. 1)
+;startretries=3                ; max # of serial start failures when starting (default 3)
+;autorestart=unexpected        ; when to restart if exited after running (def: unexpected)
+;exitcodes=0                   ; 'expected' exit codes used with autorestart (default 0)
+;stopsignal=QUIT               ; signal used to kill process (default TERM)
+;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
+;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
+;killasgroup=false             ; SIGKILL the UNIX process group (def false)
+;user=chrism                   ; setuid to this UNIX account to run the program
+;redirect_stderr=true          ; redirect proc stderr to stdout (default false)
+;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
+;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
+;stdout_logfile_backups=10     ; # of stdout logfile backups (0 means none, default 10)
+;stdout_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
+;stdout_events_enabled=false   ; emit events on stdout writes (default false)
+;stdout_syslog=false           ; send stdout to syslog with process name (default false)
+;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
+;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
+;stderr_logfile_backups=10     ; # of stderr logfile backups (0 means none, default 10)
+;stderr_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
+;stderr_events_enabled=false   ; emit events on stderr writes (default false)
+;stderr_syslog=false           ; send stderr to syslog with process name (default false)
+;environment=A="1",B="2"       ; process environment additions (def no adds)
+;serverurl=AUTO                ; override serverurl computation (childutils)
+
+; The sample eventlistener section below shows all possible eventlistener
+; subsection values.  Create one or more 'real' eventlistener: sections to be
+; able to handle event notifications sent by supervisord.
+
+;[eventlistener:theeventlistenername]
+;command=/bin/eventlistener    ; the program (relative uses PATH, can take args)
+;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
+;numprocs=1                    ; number of processes copies to start (def 1)
+;events=EVENT                  ; event notif. types to subscribe to (req'd)
+;buffer_size=10                ; event buffer queue size (default 10)
+;directory=/tmp                ; directory to cwd to before exec (def no cwd)
+;umask=022                     ; umask for process (default None)
+;priority=-1                   ; the relative start priority (default -1)
+;autostart=true                ; start at supervisord start (default: true)
+;startsecs=1                   ; # of secs prog must stay up to be running (def. 1)
+;startretries=3                ; max # of serial start failures when starting (default 3)
+;autorestart=unexpected        ; autorestart if exited after running (def: unexpected)
+;exitcodes=0                   ; 'expected' exit codes used with autorestart (default 0)
+;stopsignal=QUIT               ; signal used to kill process (default TERM)
+;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
+;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
+;killasgroup=false             ; SIGKILL the UNIX process group (def false)
+;user=chrism                   ; setuid to this UNIX account to run the program
+;redirect_stderr=false         ; redirect_stderr=true is not allowed for eventlisteners
+;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
+;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
+;stdout_logfile_backups=10     ; # of stdout logfile backups (0 means none, default 10)
+;stdout_events_enabled=false   ; emit events on stdout writes (default false)
+;stdout_syslog=false           ; send stdout to syslog with process name (default false)
+;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
+;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
+;stderr_logfile_backups=10     ; # of stderr logfile backups (0 means none, default 10)
+;stderr_events_enabled=false   ; emit events on stderr writes (default false)
+;stderr_syslog=false           ; send stderr to syslog with process name (default false)
+;environment=A="1",B="2"       ; process environment additions
+;serverurl=AUTO                ; override serverurl computation (childutils)
+
+; The sample group section below shows all possible group values.  Create one
+; or more 'real' group: sections to create "heterogeneous" process groups.
+
+;[group:thegroupname]
+;programs=progname1,progname2  ; each refers to 'x' in [program:x] definitions
+;priority=999                  ; the relative start priority (default 999)
+
+; The [include] section can just contain the "files" setting.  This
+; setting can list multiple files (separated by whitespace or
+; newlines).  It can also contain wildcards.  The filenames are
+; interpreted as relative to this file.  Included files *cannot*
+; include files themselves.
+
+[include]
+files = /etc/supervisord.d/*.ini

+ 129 - 0
supervisord.d/thread.ini

@@ -0,0 +1,129 @@
+[program:jk]
+command=python3 gateway.py
+directory=/home/sencott/jikong_script
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=3
+startretries=2000
+stderr_logfile=/var/log/jk.err.log
+stdout_logfile=/var/log/jk.out.log
+
+[program:jk_web]
+command=python3 gateway_web.py
+directory=/home/sencott/jikong_script
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT
+autostart=true
+autorestart=true
+startsecs=3
+startretries=2000
+stderr_logfile=/var/log/jk_web.err.log
+stdout_logfile=/var/log/jk_web.out.log
+
+[program:iotServerMQTT]
+command=python3 iotServerMQTT.py
+directory=/home/sencott/imageCapture
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=3
+startretries=2000
+stderr_logfile=/var/log/iotServerMQTT.err.log
+stdout_logfile=/var/log/iotServerMQTT.out.log
+
+[program:CPpost]
+command=python3 CPpost.py
+directory=/home/sencott/imageCapture
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=3
+startretries=2000
+stderr_logfile=/var/log/CPpost.err.log
+stdout_logfile=/var/log/CPpost.out.log
+
+[program:CPcapture]
+command=python3 CPcapture.py
+directory=/home/sencott/imageCapture
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=3
+startretries=2000
+stderr_logfile=/var/log/CPcapture.err.log
+stdout_logfile=/var/log/CPcapture.out.log
+
+[program:getconf]
+command=python3 getconf.py
+directory=/home/sencott/imageCapture
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=5
+startretries=2000
+stderr_logfile=/var/log/cp-getconf.err.log
+stdout_logfile=/var/log/cp-getconf.out.log
+
+[program:dataPackUp]
+command=python3 dataPackUp.py
+directory=/home/sencott/imageCapture
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=5
+startretries=2000
+stderr_logfile=/var/log/cp-dataPackUp.err.log
+stdout_logfile=/var/log/cp-dataPackUp.out.log
+
+[program:identify_fish]
+command=python3 -u identify_fish.py
+directory=/home/sencott/imageCapture
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=5
+startretries=2000
+stderr_logfile=/var/log/identify_fish.err.log
+stdout_logfile=/var/log/identify_fish.out.log
+
+[program:upload_camera_profile]
+command=python3 -u upload_camera_profile.py
+directory=/home/sencott/imageCapture
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=5
+startretries=2000
+stderr_logfile=/var/log/upload_camera_profile.err.log
+stdout_logfile=/var/log/upload_camera_profile.out.log
+
+[program:upload_biology_monitor_data]
+command=python3 -u upload_biology_monitor_data.py
+directory=/home/sencott/imageCapture
+environment=ASPNETCORE__ENVIRONMENT=Production
+user=root
+stopsignal=INT 
+autostart=true
+autorestart=true
+startsecs=5
+startretries=2000
+stderr_logfile=/var/log/upload_biology_monitor_data.err.log
+stdout_logfile=/var/log/upload_biology_monitor_data.out.log

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 115 - 0
wwwroot/adminer.php


+ 78 - 0
wwwroot/login.php

@@ -0,0 +1,78 @@
+<?php
+header("Content-type=text/json;charset=UTF-8");
+$conn = mysqli_connect("localhost", "root", "R.!a@O&t9CjweWLSTr", "centralized_control_db") or die("mysql connect error!");
+mysqli_query($conn, "set character set 'utf8'");
+date_default_timezone_set('Asia/Shanghai');
+
+$dataP = file_get_contents("php://input");
+$arr = json_decode($dataP);
+
+//$user_name = "2";
+//$password = "eccbc87e4b5ce2fe28308fd9f2a7baf3";
+//$ip = "221.0.237.194";
+$user_name = "'" . $arr->userName . "'";
+$password = "'" . $arr->password . "'";
+$ip = "'" . $arr->ip . "'";
+
+
+# 判断访问IP是否在白名单或黑名单中
+$real_data = null;
+$black_white_sql = $conn->query("SELECT `lists` FROM `user_list` WHERE `ip` = $ip;");
+while($row1 = mysqli_fetch_array($black_white_sql, MYSQLI_ASSOC)) {
+    $real_data = $row1["lists"];
+}
+
+
+if ( $real_data=='1' ) {
+    // ip在黑名单中,禁止登录
+    $res_info = "失败5次,进入黑名单";
+} else {
+    // ip不在黑名单中,判断账号密码是否正确
+    $user_pw_sql = mysqli_query($conn, "SELECT * FROM user WHERE user_name = $user_name AND password = $password;");
+    $result = $user_pw_sql->num_rows;
+    if ($result == 1) {
+        // 密码正确,允许登录
+        $res_info = "success";
+    }
+    else {
+        // 密码错误,判断是否需要增加登录失败的次数
+        if ( $real_data == '0' ) {
+            // ip在白名单中,不需要增加登录失败的次数
+            $res_info = "账号或密码错误,请重新登录";
+        } elseif ( is_null($real_data) ) {
+            // ip不在白名单中,登录失败次数+1或者加入黑名单
+            $wrong_sql = mysqli_query($conn, "SELECT `id`, `times` FROM user_var WHERE `ip` = $ip;");
+            $result_var = $wrong_sql->num_rows;
+
+            if ( $result_var=='0' ) {
+                // ip第一次登录失败
+                mysqli_query($conn, "INSERT INTO `user_var` (`ip`) VALUES ($ip);");
+                $res_info = "第1次登录失败,超过5次将进入黑名单";
+            } elseif ( $result_var=='1' ) {
+
+                while($row2 = mysqli_fetch_array($wrong_sql, MYSQLI_ASSOC)) {
+                    $id = $row2["id"];
+                    $times = $row2["times"] + 1;
+                }
+                if ( $times == 5 ) {
+                    // 已经失败5次,加入黑名单
+                    mysqli_query($conn, "INSERT INTO `user_list` (`ip`, `lists`) VALUES ($ip, 1);");
+                    mysqli_query($conn, "DELETE FROM `user_var` WHERE ((`id` = $id));");
+                    $res_info = $times."次登录失败,进入黑名单";
+                } else {
+                    // 登录失败次数+1
+                    mysqli_query($conn, "UPDATE `user_var` SET `times`=$times WHERE `id`=$id;");
+                    $res_info = "第".$times."次登录失败,超过5次将进入黑名单";
+                }
+            }
+
+        }
+    }
+}
+
+$res["result"] = $res_info;
+echo json_encode($res);
+
+$conn->close();
+?>
+

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác