Prepare the web server
- Create a home directory for the mirror HTTP server to use. i.e. “D:\mywebdirs\avastmirror”.
- In the Administration GUI - Web Service, setup a new website that points to the previously created home directory as a virtual host. i.e. “avastmirror.com”. Remember that the DNS A record for the Virtual Host just created should point to your servers IP Address. (As an alternative it is possible to use the Windows Hosts records to create use this without having to purchase a new DNS entry. This can be done by adding the IP and DNS Hostname to the C:\WINDOWS\system32\drivers\etc\hosts file).
- After setting up steps 1 and 2 it will be necessary to test this functionality. Create a test file and call it test.txt and place it in the home directory that was created in step 1. (D:\mywebdirs\avastmirror). Then go to a browser (can be from the local machine, or if using a real DNS entry that points to the server, any browser) and download this file by browsing to the URL. ( http://avastmirror.com:32000/test.txt) If the file is able to be downloaded than the web server is properly prepared.
Setup the mirror
- Create an install directory for the mirror site. i.e. D:\mirrorbase, and extract the content of mirror.zip to it. (mirror.zip can be downloaded from http://files.avast.com/files/eng/mirror.zip)
- Modify the mirror.ini file located in the D:\mirrorbase\config\ directory. Only change two lines under the [server0_0] section. Change “url” to the value you previously defined on server for the virtual host, in the example it would be url= http://avastmirror.com/. And change the upload_dest_directory to the home directory created for the mirror host. In the example it would be upload_dest_directory=d:\mywebdirs\avastmirror .
- Then run the first mirror update by executing the following command: D:\mirrorbase\avastmirror\mirror.exe /oem "IceWarp
- The setup of the mirror is now finished. To test download the definitions file with any browser that has access to the URL set up in the first section. Go to http://avastmirror.com:32000/servers_mirror.def
If the file downloads, than the mirror is working correctly.
Schedule the mirror updates
- The final step is to make it all work automatically:
Add the new task to Icewarp GUI [System] [Tools] [Tasks] and [Events] with the settings as shown bellow.
- Then click on “Run Now” in “GUI [System] [Tools] [Tasks] and [Events] and wait for a while as the event processes and then check the log in “D:\mirrorbase\avastmirror\logs\mirrors.log”. It should show the update was performed.