StormStation 5 NGX - web server setup


Setting up JSON as a MIME type

StormStation 5 NGX uses JSON file format to load settings and real-time data. Some web servers will not have JSON MIME type pre-configured which will cause the application to fail at start-up.


You can check your web server status by uploading and opening a file with .json file extension to a folder on your web server. If you try to open this file in your browser and MIME type for JSON is configured correctly the file will display its contents as text. If not you will see a 404 File Not Found error.


In cases where JSON MIME type is not configured it must be added manually on the server side. There are a number of ways to do this and below we show the most common methods.


Apache web server:

Method 1. Assumes user has access to web server configuration. Use the AddType directive in the Apache configuration:


AddType application/json .json


Method 2. No access to server configuration: Use the AddType directive in an .htaccess file. This file can be placed in the same folder as the StormStation 5 NGX web content.


AddType application/json .json


Microsoft IIS 7 and later:

Method 1. Assumes user has access to web server configuration. See Microsoft documentation here. File name extension is .json and MIME type is application/json


Method 2. No access to server configuration: Add the following lines to your web.config file in the system.webServer section:


    <mimeMap fileExtension=".json" mimeType="application/json" />


If you are having problems setting up JSON MIME type please contact tech support for your web hosting service.


Uploading StormStation 5 NGX web content

The StormVue NGX installation program will install all web related content on your hard drive in a subfolder named webfiles\ which is found on the path C:\Program Files (x86)\Astrogenic\StormVueNGX (if default installation folder is chosen during installation)


In this folder you will find a subfolder named StormStation5NGX\. Copy the entire folder with its contents to a temporary folder on your PC. Open StormStation5NGX\options folder and locate the file settings.json which you open for editing in Notepad++ or your favorite text editor.


The only configuration item that requires changing to make StormStation 5 NGX work online is to set the correct path to where the JSON data file is located on the web server. The web server data file folder is the same as for the StormVue NGX web applet. See here for how to configure NGX Data Server uploading and here for how to enable JSON format file uploads.


In settings.json locate the parameter named DataFileRelativePath and set the appropriate path to the data folder. Note that the location of the data folder is set relative to the location of the settings.json file!


As an example here is how a normal StormVue NGX web server directory structure might look with both StormVue NGX and StormStation 5 NGX uploaded. Irrelevant files are not shown:



...\StormVue NGX






To assign the relative path to the StormVueNGX\data folder we need to back up two levels from our current position which is StormStation5NGX\options\. The first time we end up in the options\ folder, second time in the public_html\ which is also the root older. From here we can point to the data folder which is found inder the StormVueNGX\ folder


So in this example, to assign the relative path we must enter "..\..\StormVue NGX\data"


Save settings.json and then upload the entire StormStation5NGX\ folder to your web server root, which in many cases is named public_html.


After all files and folder have been uploaded to your web server you can open the stormstation.htm web page in your browser. If following the example, the URL will look like this:


...where above is replaced with the URL to your own website.