FlexSim's Webserver is a query-driven manager and communication interface for FlexSim. It allows you to run FlexSim models through a web browser like Google Chrome, FireFox, Internet Explorer, etc. Since the FlexSim Web Server is a basic service to allow FlexSim to be served to a browser, you may decide you want a way to proxy to this service through a full service web server that you can control security and authentication through.
This guide will walk you through proxying to the FlexSim Web Server through Apache web server.
Install the FlexSim Web Server Program
- Download and install the FlexSim Web Server from https://account.flexsim.com
- Edit C:\Program Files (x86)\FlexSim Web Server\flexsim webserver configuration.txt
- Change the port from 80 to 8080
- Start the FlexSim Web Server by double clicking flexsimserver.bat
- Test the server by going to http://127.0.01:8080
- It should look like this:
Install Apache Web Server for Windows
- Download Apache x64 from https://www.apachehaus.com/cgi-bin/download.plx
- Extract the httpd-<version>.zip file you have downloaded
- Go into the httpd-<version> folder you have extracted and copy the Apache24 (or Apache25) folder to C:\
Install Apache Dependencies
- Make sure you have the Microsoft Visual C++ 2008 SP1 package installed. You can get it here: https://www.microsoft.com/en-US/download/details.aspx?id=26368
- Download the vcredist_x64.exe package and run the installation
Configure Apache
- Open C:\Apache24\conf\httpd.conf in a text editor
- Look for the following lines in this configuration file and remove the # character
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so - Those modules should now look like this:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so - At the bottom of the httpd.conf file, add these 3 lines and save the file:
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
AllowEncodedSlashes On
Run Apache Web Server
In a file explorer or CMD line prompt, browse to the C:\Apache24\bin folder and run httpd.exe
Now that you have the FlexSim Web Server proxied through Apache, you may decide you want to configure Apache to handle security, authentication and customization. Since this is out of the scope of this guide, you can find details on the Internet that can guide you to setting these customizations up.
A few resources you may consider: