diff --git a/platform-rhel9/nginx_access_control.conf b/platform-rhel9/json_scada_access_control.conf similarity index 100% rename from platform-rhel9/nginx_access_control.conf rename to platform-rhel9/json_scada_access_control.conf diff --git a/platform-rhel9/nginx_http.conf b/platform-rhel9/json_scada_http.conf similarity index 89% rename from platform-rhel9/nginx_http.conf rename to platform-rhel9/json_scada_http.conf index ef23fa1b..16b29e50 100644 --- a/platform-rhel9/nginx_http.conf +++ b/platform-rhel9/json_scada_http.conf @@ -1,4 +1,15 @@ - + # JSON SCADA real time webserver listening on port 8080 + upstream jsonscadarealtimewebserver { + server 127.0.0.1:8080; + keepalive 15; + } + + # FastCGI server listening on port 9000 + upstream phpbackend { + server 127.0.0.1:9000; + keepalive 15; + } + server { listen 80; server_name localhost; @@ -15,13 +26,11 @@ charset UTF-8; - #access_log ../log/host.access.log combined; - # list of IP addresses with access granted - include nginx_access_control.conf; + include json_scada_access_control.conf; location / { - root "c:/json-scada/src/htdocs/"; + root "/home/jsonscada/json-scada/src/htdocs/"; index index.html; } diff --git a/platform-rhel9/nginx_https.conf b/platform-rhel9/json_scada_https.conf similarity index 77% rename from platform-rhel9/nginx_https.conf rename to platform-rhel9/json_scada_https.conf index 364ded14..d5df9150 100644 --- a/platform-rhel9/nginx_https.conf +++ b/platform-rhel9/json_scada_https.conf @@ -1,17 +1,15 @@ ## REMOVE FIRST COLUMN HASHTAGS TO ENABLE NGINX HTTPS SERVER! ## Please regenerate ssl certificates: -## Install OpenSSL Light for Windows. -## c:\OpenSSL-Win32\bin\openssl req -config "c:\OpenSSL-Win32\openssl.cnf" -x509 -nodes -sha256 -days 36500 -newkey rsa:4096 -keyout /oshmi/conf/nginx.key -out /oshmi/conf/nginx.crt -extensions v3_req # server { # server_name $hostname; # server_tokens off; # listen 443 ssl http2; -# ssl_certificate ../../conf/nginx.crt; -# ssl_certificate_key ../../conf/nginx.key; +# ssl_certificate /home/jsonscada/json-scada/conf/nginx.crt; +# ssl_certificate_key /home/jsonscada/json-scada/conf/nginx.key; -# #ssl_client_certificate ../../conf/ca.crt; +# #ssl_client_certificate /home/jsonscada/json-scada/conf/ca.crt; # #ssl_verify_client on; # gzip on; @@ -27,18 +25,12 @@ # charset UTF-8; # #charset ISO-8859-1; -# #access_log ../log/host.access.log combined; - # # list of IP addresses with access granted -# include nginx_access_control.conf; +# include json_scada_access_control.conf; # location / { -# root "c:/json-scada/src/htdocs/"; +# root "/home/jsonscada/json-scada/src/htdocs/"; # index index.html; - -# # For user authentication (use htpasswd.exe command to manage users): -# # auth_basic "Restricted"; # For Basic Auth -# # auth_basic_user_file "c:/json-scada/conf/.htpasswd"; # For Basic Auth # } # location /index.html { @@ -106,14 +98,14 @@ # location ~ ^/svg/.+(\.svg|\.js)$ { # add_header Cache-Control "no-cache, must-revalidate"; # etag on; -# root "c:/json-scada/src/htdocs/"; +# root "/home/jsonscada/json-scada/src/htdocs/"; # } # # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # # # location ~ .php$ { -# include ../platform-windows/nginx_php-runtime/conf/fastcgi_params; -# root "c:/json-scada/src/htdocs/"; +# include fastcgi.conf; +# root "/home/jsonscada/json-scada/src/htdocs/"; # fastcgi_pass phpbackend; # fastcgi_keep_conn on; # fastcgi_index index.php; diff --git a/platform-rhel9/nginx.conf b/platform-rhel9/nginx.conf deleted file mode 100644 index a821e47b..00000000 --- a/platform-rhel9/nginx.conf +++ /dev/null @@ -1,54 +0,0 @@ - -#user nobody; -worker_processes 1; - -#error_log ../log/error.log; -#error_log ../log/error.log notice; -#error_log ../log/error.log info; -error_log "c:/json-scada/log/error.log" crit; - -#pid ../log/nginx.pid; - -events { - worker_connections 1024; -} - - -http { - #sendfile on; - #tcp_nopush on; - #tcp_nodelay on; - keepalive_timeout 65; - types_hash_max_size 2048; - server_tokens off; - - include ../platform-windows/nginx_php-runtime/conf/mime.types; - default_type application/octet-stream; - - # adjustments to allow for larger URL queries (HTTP Get) - #large_client_header_buffers 4 32k; - #http2_max_field_size 32k; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log off; - - # JSON SCADA real time webserver listening on port 8080 - upstream jsonscadarealtimewebserver { - server 127.0.0.1:8080; - keepalive 15; - } - - # FastCGI server listening on port 9000 - upstream phpbackend { - server 127.0.0.1:9000; - keepalive 15; - } - - include nginx_http.conf; - include nginx_https.conf; - -} -