FlexSim Webserver support HTTPS?

FlexSim Webserver support HTTPS?

supportPHJ4A
Enthusiast Enthusiast
127 Views
5 Replies
Message 1 of 6

FlexSim Webserver support HTTPS?

supportPHJ4A
Enthusiast
Enthusiast

[ FlexSim 22.2.1 ]

Hi,guys,

Does FlexSim Webserver support HTTPS transfer? And how to import the certificate?

Thanks


Accepted solutions (1)
128 Views
5 Replies
Replies (5)
Message 2 of 6

philboboADSK
Autodesk
Autodesk
Accepted solution

You could use a reverse proxy to allow SSL with a valid cert that goes between the flexsim web service running without SSL and the public address that you access it from.

Alternatively, you can modify line 371 of C:\Program Files (x86)\FlexSim Web Server\webserver\server.js to use https instead of http. There's a commented-out example in the lines above it:

1663077358135.png



Phil BoBo
Sr. Manager, Software Development
Message 3 of 6

laary1_
Not applicable

Hello, we're not familiar with node js. How do we point the certicate to the node.js?

0 Likes
Message 4 of 6

Ben_WilsonADSK
Community Manager
Community Manager

@laary,

When you issue the certificate you would configure it to point to some URL of your choosing, like flexsim.mycompany.com.

In Phil's example code, shown in the image attached to his answer, you would comment out line 371 ("var flexsimServer..."), and un-comment lines 363-369.

In the un-commented chunk you need to reference the path to your certificate and key files. Modify the paths ("ssl/key.pem", "ssl/cert.pem") to point to paths on your webserver's file system where you have stored your certificate and key files. The location needs to be accessible by node.js. To use those default locations ("ssl/key.pem, "ssl/cert.pem"), you would create an ssl directory in the C:\Program Files(x86)\FlexSim Web Server\webserver directory. Then place your cert.pem and key.pem files in the ssl directory you just created.

Also, you will need to change the port in the 'flexsim webserver configuration.txt' file from 80 to 443.

0 Likes
Message 5 of 6

Ben_WilsonADSK
Community Manager
Community Manager

In regards to using "a reverse proxy to allow SSL with a valid cert", please reference Paul Toone's recent articles on setting up behind a proxy:

0 Likes
Message 6 of 6

laary1_
Not applicable
This one works. Thanks @Ben Wilson
0 Likes