Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Launching the webapp using Nginx

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

  1. dan_soqqle


    Feb 2, 2022

    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.


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


    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;
    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


    Unity Technologies

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


    Feb 2, 2022
    kazuki_unity729 likes this.