Unitywebgl publishes to the cloud server to open


1. Deploy the cloud server

1. Rent a server

Newcomers can try it for free for one month. I use the Windows system with UI. Don't choose the wrong one, it has no UI.
insert image description here

2. Deploy cloud server

  • Reset the instance password on the cloud server
  • Open the remote connection on the local computer, enter the public network ip of the cloud server, and the password is the password you just set. After the connection is successful, you can see the remote desktopinsert image description here
  • Open the server manager of the remote desktop, click "Add roles and features" - always click "Next" - when the server role,
  • insert image description here
  • Feature selection:
  • insert image description here
  • Install

3. Configure IIS

Search for IIS, open and
insert image description here
start the default URL, click to browse *:80(http), it will display that the IIS welcome page can be opened normally

4. Configure security group

Go back to the cloud service webpage, click Instance-Security Group-Configuration Rules-Manual Add
insert image description here
to add port 80, and then we can enter the public network ip address on the browser to access.

2. Add the unity webgl web page

1. Open the folder on the remote desktop

insert image description here
Move the files in this folder to other places, and then put the webgl package packaged by unity into this wwroot folder.
insert image description here
Now you can use the public network ip to access, but an error will be reported.
insert image description here

2. Add MIMIE type

insert image description here
Click the MIME type on the remote desktop, then click Add in the upper right corner and add
insert image description here
another one,
file extension .data
MIME type: multipart/form-data
Now you can view unity webgl through the public network ip.

Guess you like

Origin blog.csdn.net/zjjjjjjj_/article/details/127227307