General Instructions For Any CGI VI
Here is a set of steps that can be followed to build an executable out of the
G Web Server that uses CGI VIs.
- Instructions for building an executable with the Internet Toolkit G Web Server with
CGI:
- 1. Select Tools » Build Application or Shared Library (DLL).
- 2. Select a location for the executable to be built (Destination directory).
- 3. Select Single target file containing all VIs from the Build Options
list.
- 4. Add the Top-Level VI and Dynamic VIs (be sure to include all user CGI VIs as dynamic VIs).
- 5. Select the VI Settings tab and select Edit Build Setting for each user CGI
VI. Set Remove Panel to NO for each VI (if necessary).
- 6. Add the configuration files from internet\http\conf directory as support files
and change the custom destination to be
<Destination directory>\internet\http\conf\
.
- 7. Build the executable.
- 8. Exit the Application Builder by pressing the Done button.
- 9. Edit DocumentRoot in the srm.cfg file (from the built application, not the original)
to be the location of the application's home directory. (The directory out of which you will serve
your documents. By default, all requests are taken from this directory. Normally this is the
application directory plus /www.)
- 10. Make sure that the ScriptAlias line near the bottom of scm.cfg file (from the built
application, not the original) is uncommented (remove the #).
- 11. Edit the lvhttp.cfg file (from the built application, not the original) so that UseDNS
is set to ON.
- 12. To run the GWS in module mode, make sure that the ini file has the following tokens
set to True, and for standalone mode, make sure they are set to false
Webserver.Enabled=False
InternetToolkitInstalled=False
- 13. Run the application. Note that you need to set the operation control to "start" and run the G Web Server Control VI to start the G Web Server.
- 14. To get to the CGI VI, type in http://yourservername:portyouused/cgi-bin/VIName.vi
in your browser.
© National Instruments