Forum Home › Forums › Rapid SCADA on Linux Controllers and Raspberry Pi › HTTPS on Linux
- This topic has 46 replies, 7 voices, and was last updated 3 years, 9 months ago by kumajaya.
-
AuthorPosts
-
November 28, 2018 at 8:31 am #4669SuperDevParticipant
I did not have problem with https running. The only problem is URL Rewrite like on windows. https://forum.rapidscada.org/?topic=run-self-ssl-to-secure-scada
As you remember we added Url Rewrite on IIS and made it work.
But on linux again that problem occurs when running https and any trick we did we couldn’t solve the problem.
yet the errorScheme loading failed. Try to reload scheme
shows while loading scheme
<img src=”http://s8.picofile.com/file/8344101834/iis0.png” alt=”error loading scheme in rapid scada” /November 28, 2018 at 4:02 pm #4674MikhailModeratorI think the only way at this time is written here. I mean using reverse proxy.
November 29, 2018 at 6:14 am #4679SuperDevParticipantBut i don’t have problem in https. I have configured my linux server and it loads https and converts http to https as well.
The only problem is Url Rewrite. when https loads the schemes (in iframe) doesn’t load.
Exactly like this in windows:
https://forum.rapidscada.org/?topic=run-self-ssl-to-secure-scada/#post-4623November 29, 2018 at 6:09 pm #4683MikhailModeratorPlease make a screenshot of the browser console (Press F12 in browser).
November 30, 2018 at 9:18 am #4687November 30, 2018 at 4:04 pm #4689MikhailModeratorThere is no screenshot by this link. At least on my PC.
December 1, 2018 at 7:35 am #4691SuperDevParticipantDecember 2, 2018 at 9:57 am #4694MikhailModeratorI asked for a screenshot but I see *.json file.
December 4, 2018 at 8:28 am #4702SuperDevParticipantHi
As you know we use the below command while installing mono for apache to install required modules.
sudo apt-get install libapache2-mod-mono mono-apache-server4The question is this, what command should we use if we want to install mono for nginx
December 4, 2018 at 10:53 am #4703SuperDevParticipantDecember 4, 2018 at 2:50 pm #4705MikhailModeratorHi,
You should press F12 in browser, go to the Console and Network tabs and make a screenshot of the detailed error message.
December 15, 2020 at 1:51 pm #7732vertigo0001Participantdid we have a solution for HTTPS to rapid SCADA on Linux?
December 16, 2020 at 1:39 pm #7745MikhailModeratorWe recently discussed this in Russian forum. Could you use Google Translate starting from this message? Pay attention to the link to a manual which describes how to use nginx as an endpoint. We can continue the discussion here.
December 24, 2020 at 2:47 am #7817kumajayaParticipantI believe Nginx must be better but since somehow mono-xsp4 available on my Ubuntu system:
PART 1: mono-xsp configuration
1. Copy /etc/init.d/mono-xsp4 as /etc/init.d/scada-xsp4 and modify it:
sudo cp /etc/init.d/mono-xsp4 /etc/init.d/scada-xsp4
sudo nano /etc/init.d/scada-xsp4#! /bin/sh ### BEGIN INIT INFO # Provides: mono-xsp4 # Required-Start: $remote_fs # Required-Stop: $remote_fs # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Mono XSP4 # Description: Debian init script for Mono XSP4. ### END INIT INFO # # Written by Pablo Fischer <pablo@pablo.com.mx> # Dylan R. E. Moonfire <debian@mfgames.com> # Modified for Debian GNU/Linux # # Version: @(#)mono-xsp4 pablo@pablo.com.mx # # Variables PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/xsp4 NAME=scada-xsp4 DESC="XSP 4.0 WebServer" DEFAULT=/etc/default/$NAME CFGDIR=/etc/xsp4 VIRTUALFILE=$CFGDIR/scada.webapp MONO_SHARED_DIR=/var/run/$NAME start_boot=false # Use LSB . /lib/lsb/init-functions # If we don't have the basics, don't bother test -x $DAEMON || exit 0 test -f $DEFAULT && . $DEFAULT if [ "x$start_boot" != "xtrue" ] ; then exit 0 fi if [ ! -e $MONO_SHARED_DIR ]; then mkdir $MONO_SHARED_DIR chown $user:$group $MONO_SHARED_DIR fi should_start() { if [ ! -e $VIRTUALFILE -o <code>cat $VIRTUALFILE | wc -l</code> = "2" ]; then log_action_msg "You have an incomplete $VIRTUALFILE" log_action_msg "To fix it, you need to install at least one package for xsp4 (like asp.net-examples)" return 1 fi if [ -f /var/run/$NAME.pid ]; then # Are we really running xsp4? xsp4_pid=<code>cat /var/run/$NAME.pid</code> xsp4_ps=<code>ps -p $xsp4_pid | wc -l</code> if [ "$xsp4_ps" != "1" ]; then log_action_msg "Sorry, there is already a xsp4 running, stop it first" return 1 fi fi return 0 } case "$1" in start) if should_start ; then log_daemon_msg "Starting $DESC" "$NAME" export MONO_SHARED_DIR start-stop-daemon --start --background --make-pidfile \ --quiet --pidfile /var/run/$NAME.pid \ --user $user --group $group --chuid $user \ --exec $DAEMON -- \ --port $port --address $address --appconfigdir \ $CFGDIR --nonstop log_end_msg $? fi ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" for i in $(ps aux | grep -v grep | grep 'xsp4.exe' | cut -c 10-15) do kill $i > /dev/null 2>&1 done log_end_msg $? ;; restart|force-reload) $0 stop $0 start ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0
2. Copy /etc/default/mono-xsp4 as /etc/default/scada-xsp4 and modify it:
sudo cp /etc/default/mono-xsp4 /etc/default/scada-xsp4
sudo nano /etc/default/scada-xsp4# Defaults for mono-xsp4, official version # sourced by /etc/init.d/scada-xsp4 # Should we start it? start_boot=true # User and group by default user=www-data group=www-data # Default port port=8000 address=0.0.0.0 # Directory for config files config_files=/etc/scada-xsp4
3. Copy /etc/xsp4/debian.webapp as /etc/xsp/scada.webapp and modify it:
sudo cp /etc/xsp4/debian.webapp /etc/xsp4/scada.webapp
sudo nano /etc/xsp4/scada.webapp<apps> <web-application> <name>scada</name> <vpath>/</vpath> <path>/opt/scada/ScadaWeb</path> </web-application> </apps>
4. Activate scada-xsp4 service and start it:
cd /etc/init.d/
sudo chmod +x scada-xsp4
sudo update-rc.d scada-xsp4 defaults
sudo service scada-xsp4 start5. Open http://localhost:8000 on your browser for testing
December 24, 2020 at 2:53 am #7818kumajayaParticipantPART 2: Apache configuration
Depend on your server configuration, my working /etc/apache2/sites-enabled/default-ssl.conf configuration:
SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off SSLProxyCheckPeerExpire off ProxyPreserveHost off ProxyRequests off ProxyVia off ProxyPass / http://127.0.0.1:8000/ ProxyPassReverse / http://127.0.0.1:8000/
-
AuthorPosts
- You must be logged in to reply to this topic.