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 4 years, 10 months ago by
kumajaya.
-
AuthorPosts
-
January 23, 2021 at 6:46 am #8146
kumajaya
ParticipantI just installed RS on Ubuntu server 20.04 and follow https://www.mono-project.com/docs/web/fastcgi/nginx/ without any success, repeatedly errors in table view. I want to run RS purely with Nginx without Apache. A tested working solution:
1. Add ScadaWeb to Mono XSP server:
sudo mono-xsp4-admin add --path=/opt/scada/ScadaWeb --app=/scada
2. Fix mono-xsp service bug:
sudo nano /etc/init.d/mono-xsp
change:
for i in $(ps aux | grep -v grep | grep 'xsp4.exe' | cut -c 10-15)
to:
for i in $(ps aux | grep -v grep | grep 'xsp4.exe' | cut -c 10-17)
3. Reload mono-xsp service:
sudo systemctl daemon-reload
4. Start Mono XSP server. Server will run on port 8084, you can change it in /etc/default/mono-xsp4:
sudo systemctl start mono-xsp
5. Follow https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04 to install Nginx
6. Follow https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04 to secure Nginx
7. Edit /etc/nginx/sites-available/example.com and add:if ($scheme != "https") { return 301 https://$host$request_uri; } location /scada { proxy_pass http://127.0.0.1:8084; sub_filter 'example.com:8084' 'example.com'; sub_filter 'example.com%3a8084' 'example.com'; sub_filter_once on; proxy_redirect off; proxy_buffering off; 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_set_header X-Forwarded-Proto $scheme; }8. Restart Nginx:
sudo systemctl restart nginx
9. Test as previous post.NOTE: Not tested to load a scheme yet but “Unable to receive list of plugins” in Main Menu – Plugins – Download
January 23, 2021 at 1:32 pm #8148kumajaya
ParticipantI can’t edit my own post, a few correction:
Step 2. Fix mono-xsp4 service bug:
sudo nano /etc/init.d/mono-xsp4
Step 4. Start Mono XSP server. Server will run on port 8084, you can change it in /etc/default/mono-xsp4:
sudo systemctl start mono-xsp4 -
AuthorPosts
- You must be logged in to reply to this topic.