Wowza Community

Configuring HTTPS with REST API

When using a self signed certificate for testing purposes I enabled HTTPS on port 443. It seems WOWZA is using the certificate and HTTPS is working for transport, but the REST API results are different. Using CURL to show the problem I send the following without HTTPS …

    curl -X GET --digest -u "USER:PASSWORD" -H 'Accept:application/json; charset=utf-8' \
           "http://localhost:8087/restinfo" 

In response I get some JSON that looks like …

     {"apiVersion":1,"restBuild":"20200213142111","centralConfig":false,"licenseValid":true}

However when I switch to HTTPS with the following CURL command …

    curl -k -X GET --digest -u "USER:PASSWORD" -H 'Accept:application/json; charset=utf-8' \
        "https://localhost:443/restinfo" 

In response I do not get the expected info as above. Instead I get HTML not JSON with a build string as shown below …

<html><head><title>Wowza Streaming Engine 4 Developer Edition (Expires: Aug 27, 2020) 4.8.0 build20200213142111</title></head><body>Wowza Streaming Engine 4 Developer Edition (Expires: Aug 27, 2020) 4.8.0 build20200213142111</body></html>

Note that I added the -k switch to curl command because of the use of a self signed certificate for testing purposes. Am I doing something wrong ? I followed the directions for converting to HTTPS using a self signed certificate at the following link …

https://www.wowza.com/docs/how-to-create-a-self-signed-ssl-certificate

The REST API operates on port 8087, not on port 443. The REST server is configured in the Server.xml under the tag, and you can set up SSL in the section.

Port 443 is not assigned by default, and if it’s assigned, it’s used for Streaming, not for the REST interface, and typically defined in the VHost.xml