title: 500 (Internal Server Error) with Laravel & Docker
body: <p>I create Laravel PHP application in Docker. First I setup Laravel app using </p>
  
  <pre><code>laravel new laravelDockerApp
  </code></pre>
  
  <p>it creates successfully.I verify it's setup by built-in server</p>
  
  <pre><code>php artisan serve
  </code></pre>
  
  <p>Then setup Local environment with Docker</p>
  
  <p>docker-compose.yml </p>
  
  <pre><code>version: '2'
  
  services:
    web:
      build:
        context: ./
        dockerfile: web.docker
      volumes:
        - ./:/var/www
      ports:
        - "8080:80"
      links:
        - app
    app:
      build:
        context: ./
        dockerfile: app.docker
      volumes:
        - ./:/var/www
  </code></pre>
  
  <p>app.docker</p>
  
  <pre><code>FROM php:7-fpm
  
  RUN apt-get update &amp;&amp; apt-get install -y libmcrypt-dev mysql-client \
      &amp;&amp; docker-php-ext-install mcrypt pdo_mysql
  
  WORKDIR /var/www
  </code></pre>
  
  <p>web.docker</p>
  
  <pre><code>FROM nginx:1.10
  
  ADD ./vhost.conf /etc/nginx/conf.d/default.conf
  WORKDIR /var/www
  </code></pre>
  
  <p>vhost.conf</p>
  
  <pre><code>server {
      listen 80;
      index index.php index.html;
      root /var/www/public;
  
      location / {
          try_files $uri /index.php?$args;
      }
  
      location ~ \.php$ {
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass app:9000;
          fastcgi_index index.php;
          include fastcgi_params;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param PATH_INFO $fastcgi_path_info;
      }
  }
  </code></pre>
  
  <p>I run <code>docker-compose up -d</code> command. app &amp; web containers up successfully.When I check app in Browser using </p>
  
  <blockquote>
    <p>localhost:8080</p>
  </blockquote>
  
  <p>I got </p>
  
  <blockquote>
    <p>500(Internal Server Error)</p>
  </blockquote>
  
  <p>Please, can you help to solve this? Thanks.</p>