title: Yii2: Application can't be executed. Apache shows "Index of"
body: <p>I developed a Yii2 application that works in my computer with Debian.</p>
  
  <p>Then I installed <a href="https://bitnami.com/stack/wapp" rel="nofollow noreferrer">Bitnami WAPP</a> in a computer with Windows 8 and I tried to execute it but it doesn't work. It shows the content like a folder instead of execute the code:</p>
  
  <p><a href="https://i.stack.imgur.com/jtXgj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jtXgj.png" alt="Index of instead of executing"></a></p>
  
  <p>I thought that Apache was having a problem and it can't execute PHP, so I tried to execute a basic example and it works perfect:</p>
  
  <pre><code>&lt;?php 
    phpinfo(); 
  ?&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/E1O9G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E1O9G.png" alt="Basic PHP example executed successfully"></a></p>
  
  <p><strong>UPDATE:</strong> I think the problem was a wrong address. But now it shows this error:</p>
  
  <p><a href="https://i.stack.imgur.com/5VAcp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5VAcp.png" alt="Error 500"></a>
  I hope all this information can help.</p>
  
  <p><strong>Apache log:</strong></p>
  
  <pre><code>[Thu Jul 12 08:22:35.576377 2018] [php7:warn] [pid 5100:tid 1004] [client ::1:56103] PHP Warning:  require(C:\\Bitnami\\wappstack-7.1.19-0\\apache2\\htdocs\\donaciones-yii\\backend\\web/../../vendor/autoload.php): failed to open stream: No such file or directory in C:\\Bitnami\\wappstack-7.1.19-0\\apache2\\htdocs\\donaciones-yii\\backend\\web\\index.php on line 5
  [Thu Jul 12 08:22:35.576377 2018] [php7:error] [pid 5100:tid 1004] [client ::1:56103] PHP Fatal error:  require(): Failed opening required 'C:\\Bitnami\\wappstack-7.1.19-0\\apache2\\htdocs\\donaciones-yii\\backend\\web/../../vendor/autoload.php' (include_path='.;C:/Bitnami/wappstack-7.1.19-0/php/PEAR') in C:\\Bitnami\\wappstack-7.1.19-0\\apache2\\htdocs\\donaciones-yii\\backend\\web\\index.php on line 5
  </code></pre>
  
  <p><strong>Apache access.log:</strong></p>
  
  <pre><code>::1 - - [12/Jul/2018:08:22:35 -0300] "GET /donaciones-yii/backend/web/ HTTP/1.1" 500 -
  </code></pre>
  
  <p><strong>donaciones-yii/backend/web/index.php:</strong></p>
  
  <pre><code>&lt;?php
  defined('YII_DEBUG') or define('YII_DEBUG', false);
  defined('YII_ENV') or define('YII_ENV', 'dev');
  
  require(__DIR__ . '/../../vendor/autoload.php');
  require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
  require(__DIR__ . '/../../common/config/bootstrap.php');
  require(__DIR__ . '/../config/bootstrap.php');
  
  $config = yii\helpers\ArrayHelper::merge(
      require(__DIR__ . '/../../common/config/main.php'),
      require(__DIR__ . '/../../common/config/main-local.php'),
      require(__DIR__ . '/../config/main.php'),
      require(__DIR__ . '/../config/main-local.php')
  );
  
  (new yii\web\Application($config))-&gt;run();
  </code></pre>