HTTPS on Linux

Tagged: , , ,

Viewing 2 posts - 46 through 47 (of 47 total)
  • Author
    Posts
  • #8146
    kumajaya
    Participant

    I 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

    #8148
    kumajaya
    Participant

    I 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

Viewing 2 posts - 46 through 47 (of 47 total)
  • You must be logged in to reply to this topic.