title: Opentok start API on server
body: <p>Help me please </p>
  
  <p>I'm trying to start Opentok video, i read all information, but i still can`t understand.</p>
  
  <p>I started OpenTok API on heroky. And it's ok, but i don't understand how to start it on my server.
  I can't use heroky because of CORP error.</p>
  
  <p>When I try to use heroky through a js script from example, I get a CORP error.(config.js is correct) <br>
  If I try to run the example from archiving php via <code>sh run-demo</code>, then it starts, but only on http, which constantly writes that an https connection is required for the camera and microphone to work.</p>
  
  <p>Please help, please. I can’t understand how I can run this on https.</p>
  
  <p>If I register a port in apache2, then when run-demo starts, a message appears stating that this port is already in use.</p>
  
  <p>Trying to approach the problem from the other side, I tried to install the API on my server, specifying the path in apache2 to <code>/ web / index.php</code>, but I only open the page as on heroky, but the methods themselves do not work.</p>
  
  <p>Help me please. The fourth day in tears. <br></p>
  
  <p>How i can start API on my own server or at least start archiving across run-demo?</p>
  
  <p>On the main site it is completely incomprehensible written. <br>
  It is said just run on your server and not a word about https <br>
  I tried to watch the video on youtube, but there is also nothing about how to run on https. </p>
  
  <p>Please help, good people.</p>
  
  <p>Don't understand what i can add here to make help easier
  My run-demo file</p>
  
  <pre><code>#!/bin/sh
  
  if [ -z "$TOKBOX_API_KEY" ] || [ -z "$TOKBOX_SECRET" ]
  then
    export API_KEY=HereIUseMyKey
    export API_SECRET=HereIUseMySecretFromSite
  fi
  
  if [ -d "storage" ]
  then
    rm -rf storage/
  fi
  
  php -S mysite.ru:8080 -t web/
  </code></pre>
  
  <p>Trying to start API on my server with this <a href="https://github.com/opentok/learning-opentok-php" rel="nofollow noreferrer">https://github.com/opentok/learning-opentok-php</a></p>
  
  <p>CORP error getting with this example <a href="https://github.com/opentok/opentok-web-samples/tree/master/Archiving" rel="nofollow noreferrer">https://github.com/opentok/opentok-web-samples/tree/master/Archiving</a></p>
  
  <p>Can't start php example archiving with <a href="https://github.com/opentok/OpenTok-PHP-SDK/tree/master/sample/Archiving" rel="nofollow noreferrer">https://github.com/opentok/OpenTok-PHP-SDK/tree/master/sample/Archiving</a>  using heroky</p>
  
  <p>If something else can help please tell me, I’ll add right away</p>