Skip to content

Commit b403d2e

Browse files
author
Ricardo Olsen
committed
Version 6.0.
1 parent dd69492 commit b403d2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2248
-2114
lines changed

conf_templates/brasil.svg

100644100755
Lines changed: 345 additions & 396 deletions
Loading

conf_templates/hmi.ini

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ IP_BDTR1="127.0.0.1"
164164
; Permite habilitar o alarme sonoro quando há dupla transição (0=não toca alarme, 1=toca alarme)
165165
;DOUBLE_TRANSITION_ALARM=0
166166

167-
; Remote IP Address list, comma separated, * = everyone can access.
167+
; Remote IP Address list, comma separated, * = everyone can access
168168
; Default = empty (normally it's empty)
169169
; This is valid only for webserver.exe and do not affect NGINX.
170170
; Lista de clientes web remotos com permissão de acesso, endereços IP separados por vírgula, * libera tudo
171171
;REMOTE_CLIENTS=""
172172

173-
; Last priority of alarms that beeps.
173+
; Last priority of alarms that beeps
174174
; Default = 2
175175
;LAST_PRIORITY_THAT_BEEPS=2
176176

@@ -182,6 +182,10 @@ IP_BDTR1="127.0.0.1"
182182
; Default = 1
183183
;HTTPD_MODE=1
184184

185+
; Origin for the http CORS header Access-Control-Allow-Origin to responses (use empty string to remove header)
186+
; Default = "*"
187+
; CORS_ORIGIN="*"
188+
185189
;---------------------------------------------------------------------------------------------------
186190
[HIST]
187191
; Do record historic data (SQLITE): 1=yes, 0=no

conf_templates/nginx.conf

100644100755
Lines changed: 23 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -15,95 +15,40 @@ events {
1515

1616

1717
http {
18+
#sendfile on;
19+
#tcp_nopush on;
20+
#tcp_nodelay on;
21+
keepalive_timeout 65;
22+
types_hash_max_size 2048;
23+
server_tokens off;
24+
1825
include mime.types;
1926
default_type application/octet-stream;
2027

28+
# adjustments to allow for larger URL queries (meaning more objects in displays)
29+
large_client_header_buffers 4 32k;
30+
http2_max_field_size 32k;
31+
2132
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
2233
# '$status $body_bytes_sent "$http_referer" '
2334
# '"$http_user_agent" "$http_x_forwarded_for"';
2435

2536
access_log off;
2637

27-
sendfile on;
28-
#tcp_nopush on;
29-
30-
#keepalive_timeout 0;
31-
keepalive_timeout 65;
32-
33-
server {
34-
listen 51909;
35-
server_name localhost;
36-
37-
#listen 443 ssl;
38-
39-
#ssl_certificate ../../conf/nginx.crt;
40-
#ssl_certificate_key ../../conf/nginx.key;
41-
42-
gzip on;
43-
gzip_buffers 16 8k;
44-
gzip_comp_level 4;
45-
gzip_http_version 1.0;
46-
gzip_min_length 1280;
47-
gzip_types *;
48-
gzip_vary on;
49-
gzip_disable msie6;
50-
51-
#charset koi8-r;
52-
charset UTF-8;
53-
#charset ISO-8859-1;
54-
55-
#access_log logs/host.access.log combined;
56-
57-
location / {
58-
root ../;
59-
index index.html index.htm;
60-
61-
include ../../conf/nginx_access_control.conf;
62-
}
63-
64-
# blocks access to files other than those inside /htdocs and /svg and partially in the /conf folder.
65-
location ~ /(bin|browser|browser-data|conf_templates|db|etc|extprogs|linux|nginx_php|scripts|conf/point_list.txt|conf/point_calc.txt|conf/hmi.ini|conf/hmishell.ini|conf/qtester104.ini|conf/nginx_access_control.conf) {
66-
deny all;
67-
return 404;
68-
}
69-
70-
# reverse proxy, redirect ajax requests to OSHMI webserver.exe
71-
location /htdocs/pntserver.rjs {
72-
proxy_pass http://127.0.0.1:51908/htdocs/pntserver.rjs;
73-
}
74-
75-
#error_page 404 /404.html;
76-
77-
# redirect server error pages to the static page /50x.html
78-
#
79-
error_page 500 502 503 504 /50x.html;
80-
location = /50x.html {
81-
root html;
82-
}
83-
84-
# redirect OData metadata url for PowerBI
85-
location ~ (.*)/\$metadata {
86-
rewrite (.*)/\$metadata$ $1?METADATA=1 permanent; break;
87-
return 403;
88-
}
89-
90-
# use utf8 for OSHMI SVG content
91-
location ~ .svg$ {
92-
add_header Content-Type "image/svg+xml;charset=UTF-8";
93-
root ../;
94-
}
38+
# OSHMI real time webserver listening on port 51908
39+
upstream oshmirealtimewebserver {
40+
server 127.0.0.1:51908;
41+
keepalive 15;
42+
}
9543

96-
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
97-
#
98-
location ~ .php$ {
99-
include fastcgi_params;
100-
root ../;
101-
fastcgi_pass 127.0.0.1:9000;
102-
fastcgi_index index.php;
103-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
104-
}
105-
44+
# FastCGI server listening on port 9000
45+
upstream phpbackend {
46+
server 127.0.0.1:9000;
47+
keepalive 15;
10648
}
10749

50+
include ../../conf/nginx_http.conf;
51+
include ../../conf/nginx_https.conf;
52+
10853
}
10954

conf_templates/nginx_http.conf

100644100755
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
22
server {
33
listen 51909;
44
server_name localhost;
@@ -24,19 +24,19 @@
2424
root ../;
2525
index index.html index.htm;
2626
}
27-
27+
2828
# reverse proxy, redirect ajax requests to OSHMI webserver.exe
2929
# to be disabled for secure access (https) only
3030
location /htdocs/pntserver.rjs {
31-
proxy_pass http://127.0.0.1:51908/htdocs/pntserver.rjs;
31+
proxy_pass http://oshmirealtimewebserver/htdocs/pntserver.rjs;
3232
proxy_set_header Host $host;
3333
proxy_set_header X-Real-IP $remote_addr;
3434
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
3535
}
3636

3737
# reverse proxy, redirect ajax requests to OSHMI webserver.exe
3838
location /htdocs/shellapi.rjs {
39-
proxy_pass http://127.0.0.1:51908/htdocs/shellapi.rjs;
39+
proxy_pass http://oshmirealtimewebserver/htdocs/shellapi.rjs;
4040
proxy_set_header Host $host;
4141
proxy_set_header X-Real-IP $remote_addr;
4242
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -81,8 +81,10 @@
8181
location ~ .php$ {
8282
include fastcgi_params;
8383
root ../;
84-
fastcgi_pass 127.0.0.1:9000;
84+
fastcgi_pass phpbackend;
85+
fastcgi_keep_conn on;
8586
fastcgi_index index.php;
87+
fastcgi_read_timeout 10s;
8688
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
8789
}
8890

@@ -161,8 +163,10 @@
161163
# location ~ .php$ {
162164
# include fastcgi_params;
163165
# root ../;
164-
# fastcgi_pass 127.0.0.1:9000;
166+
# fastcgi_pass phpbackend;
167+
# fastcgi_keep_conn on;
165168
# fastcgi_index index.php;
169+
# fastcgi_read_timeout 10s;
166170
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
167171
# }
168172
# # deny access to .htaccess files, if Apache's document root

conf_templates/nginx_https.conf

100644100755
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@
4343

4444
# # reverse proxy, redirect ajax requests to OSHMI webserver.exe
4545
# location /htdocs/pntserver.rjs {
46-
# proxy_pass http://127.0.0.1:51908/htdocs/pntserver.rjs;
46+
# proxy_pass http://oshmirealtimewebserver/htdocs/pntserver.rjs;
4747
# proxy_set_header Host $host;
4848
# proxy_set_header X-Real-IP $remote_addr;
4949
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
5050
# }
5151

5252
# # reverse proxy, redirect ajax requests to OSHMI webserver.exe
5353
# location /htdocs/shellapi.rjs {
54-
# proxy_pass http://127.0.0.1:51908/htdocs/shellapi.rjs;
54+
# proxy_pass http://oshmirealtimewebserver/htdocs/shellapi.rjs;
5555
# proxy_set_header Host $host;
5656
# proxy_set_header X-Real-IP $remote_addr;
5757
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -98,8 +98,10 @@
9898
# location ~ .php$ {
9999
# include fastcgi_params;
100100
# root ../;
101-
# fastcgi_pass 127.0.0.1:9000;
101+
# fastcgi_pass phpbackend;
102+
# fastcgi_keep_conn on;
102103
# fastcgi_index index.php;
104+
# fastcgi_read_timeout 10s;
103105
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
104106
# }
105107
# }

conf_templates/office.svg

100644100755
Lines changed: 19 additions & 16 deletions
Loading
-1.56 KB
Binary file not shown.
2.63 KB
Binary file not shown.

etc/autoselectclientcert.reg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Windows Registry Editor Version 5.00
22

33
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Chromium\AutoSelectCertificateForUrls]
4-
"1"="{\"pattern\":\"https://127.0.0.1\",\"filter\":{\"ISSUER\":{\"CN\":\"CEEE.COM.BR\"}}}"
4+
"1"="{\"pattern\":\"https://127.0.0.1\",\"filter\":{\"ISSUER\":{\"CN\":\"OSHMI.COM\"}}}"

etc/remove_services.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ c:\oshmi\bin\nssm remove OSHMI_iec104 confirm
1717
c:\oshmi\bin\nssm remove OSHMI_dnp3 confirm
1818
c:\oshmi\bin\nssm remove OSHMI_modbus confirm
1919
c:\oshmi\bin\nssm remove OSHMI_iccp confirm
20-
c:\oshmi\bin\nssm remove OSHMI_iec104_log
20+
c:\oshmi\bin\nssm remove OSHMI_iec104_log confirm
2121

2222
rem Reactivate mon_proc (mon_proc runs the processes interactively with a logged user)
2323
rem This mode is best for configuration and debugging

0 commit comments

Comments
 (0)