Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Launching the webapp using Nginx

Discussion in 'Unity Render Streaming' started by dan_soqqle, Aug 16, 2022.

  1. dan_soqqle

    dan_soqqle

    Joined:
    Feb 2, 2022
    Posts:
    114
    Hi,

    I am trying to route from Nginx (where i used cert bot for ssl) to a pm2 application running the web app. However when i try to access the bidirectional it does not seem to pick up the client/public folder well.

    upload_2022-8-16_9-47-22.png

    I also noticed the index is missing the css thus not picking up the public

    upload_2022-8-16_9-48-4.png

    I start the pm2 with this:

    pm2 start build/index.js -- -m private -w -port 3000

    My nginx

    Code (Boo):
    1. proxy_pass http://localhost:3000;
    2.     proxy_http_version 1.1;
    3.     proxy_set_header Upgrade $http_upgrade;
    4.     proxy_set_header Connection 'upgrade';
    5.     proxy_set_header Host $host;
    6.   proxy_set_header X-Real-IP $remote_addr;
    7.         proxy_set_header X-Forwarded-Proto $scheme;
    8.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    9.     proxy_cache_bypass $http_upgrade;
    10.  
    11.     listen [::]:443 ssl ipv6only=on; # managed by Certbot
    12.     listen 443 ssl; # managed by Certbot
    13.     ssl_certificate /etc/letsencrypt/live/xx.xx.xx/fullchain.pem; # managed by Certbot
    14.     ssl_certificate_key /etc/letsencrypt/live/xx.xx.xx/privkey.pem; # managed by Certbot
    15.     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    16.     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
    PS: i also posted something on stackoverflow because i am wondering if i am getting the typescript thing wrong. but i think maybe some folks here may have more context on the renderstreaming webapp
     
  2. kazuki_unity729

    kazuki_unity729

    Unity Technologies

    Joined:
    Aug 2, 2018
    Posts:
    803
    I would be glad if you share the link you posted on stackoverflow. Thank you.
     
  3. dan_soqqle

    dan_soqqle

    Joined:
    Feb 2, 2022
    Posts:
    114
    kazuki_unity729 likes this.