How to use Apache as TS2log default Web server

Pre-requisites

It can be useful to Update TS2log to be sure that you get the latest TS2log release.

1) Start AdminTool and go to the Web Tab

Click On the Manage Web Servers tile, check Use a different HTTP web server if you want to use Apache Server.

A pop-up will recommend you to change Apache HTTP port to 81.

Screenshot 1-2

Then, click on Select a new folder tile to tell TS2log where will be the new web folder root.
TS2log will copy the requested files/folders into this new root folder and, at this point, the TS2log setting for Apache is almost terminated.

It’s now time to set up Apache.

2) Setting up Apache

Change the HTTP from 80 to 81.

The specific way of doing this depends on your Apache version and your current Apache settings.

We advise you to backup any Apache settings file before modifying them, so you will have a way to restore them if needed.

Usually you can change Apache listening port by editing the file httpd.conf found in "Apache\conf" directory:

Listen 81

Once it is done, restart the Apache service.

3) Going back to TS2log Web Servers Management tool

You can set the HTTP and HTTPS ports in TS2log Web Management tool. We recommend using standard ports, but this feature can be handy when you try to avoid a conflict with an other process.

Screenshot 3-1

4) Last steps

For the Universal Printer, we need to be able to write in the PRINTS folder.

So, verify that Everyone/Users... have full rights on .../prints folder.

Screenshot 4-1

Screenshot 4-2

Then select the .html file you wish to use as a Web Access page in:

C:\Program Files (x86)\TS2log\Clients\www

and copy it as index.html in your web root folder, typically this is the "Apache\htdocs" directory.

5) Specific Settings for TS2log Gateway Portal, Load Balancing and/or HTML5 file transfer

If you want to use this Apache based system as a TS2log Gateway Portal and/or use Load Balancing features and/or use HTML5 file transfer features, you will need to allow the execution of TS2log GCI scripts by Apache.

First, you must have the CGI module enabled in Apache.

Edit the file httpd.conf found in "Apache\conf" directory, and search for a line looking like:

;LoadModule cgi_module modules/mod_cgi.so

Remove the ";" to enable the CGI module:

LoadModule cgi_module modules/mod_cgi.so

Then, find a line starting by:

AddHandler cgi-script

And add the .exe extension to authorize .exe files to be handled as CGI programs by Apache:

AddHandler cgi-script .exe

Finally, you must tell Apache that the TS2log "cgi-bin" folder contains CGI programs. To do so, you must add the following line in the file httpd.conf found in "Apache\conf" directory:

ScriptAlias /cgi-bin/ "C:/Program Files (x86)/TS2log/Clients/www/cgi-bin/"
        

Once it is done, restart the Apache service.

If you face any issue concerning CGI on your Apache server, please refer to the Official Apache documentation

Checking your settings: To validate your settings, please open a web browser on your server and go to http://localhost/cgi-bin/hb.exe. If you get an Apache error page, you have an issue in your Apache configuration. If you get a line of text/numbers, everything is fine!


Back To Top