====== How To ======
====== Apache Proxy ======
DuVoice uses the Apache web server to host it's own web application on the local machine. It can also be configured to proxy a URL to a different server and or port provided the mod_proxy module has been installed. Using Apache to proxy REST API access can give a site more security and support HTTPS.
This configuration is unsupported and must be configured by the customer and may be broken by future updates/upgrades of the system. Not a great deal of testing has been done using this method and no DuVoice products implement this.
In this example we will proxy the path //myapi// using the configuration file myapi.conf. Placing this file under the same folder as either the WEB Applications or Apache could cause it to be deleted on future updates/upgrades. For this example we create a folder called C:\myapi to place the configuration file in.
**DO NOT USE ANY OF THE FOLLOWING PATHS** or any matching the DuVoice web applications. \\ /rest \\ /inndesk \\ /admin \\ /inventory \\ /rest \\ /roomstatus
For additional security do not use the folder and path used in this guide and use a file name, folder and path of your own choosing.
===== Configuration =====
==== MYAPI.CONF ====
Create a configuration file in a location of your choice with the contents below. If you elect not to use //myapi// then you must change it.
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyPass /myapi http://127.0.0.1:10022
==== HTTPD.CONF ====
The Apache configuration file must be modified to include this new configuration. This file is located in //C:\inetstack\apache\conf\httpd.conf//.
At the end of httpd.conf, add an include of your configuration file.
Example:
IncludeOptional c:\myapi\myapi.conf
==== Testing ====
Restart Apache server and try accessing the REST API. This can be done locally or remotely using the correct URL. For example using a local web browser with the path you set in the configuration will return you a JSON document of the system information.
http://127.0.0.1/myapi/rest/system
==== HTTPS ====
This proxy also supports HTTPS if the Apache server is configured to support SSL using the information found [[https://support.duvoice.com/vs6/manual/web/setup/https|here]].