title: How to run Nginx + SSL in docker?
body: <p>This configuration was tested without docker. The site on SSL was launched without errors. Now when I want to run this server configuration in docker, I get no errors during installation, but the server does not start at all.</p>
  <p><strong>nginx.dockerfile</strong></p>
  <pre><code>    FROM nginx:stable-alpine
  
  RUN mkdir -p /var/www/html
  WORKDIR /var/www/html
  RUN addgroup -g 1000 laravel &amp;&amp; adduser -G laravel -g laravel -s /bin/sh -D laravel
  
  RUN chown laravel:laravel /var/www/html
  
  COPY ./nginx/ssl/mysite.ru/mysite_ru.crt /etc/nginx/ssl/mysite.ru/mysite_ru.crt
  COPY ./nginx/ssl/mysite.ru/mysite_ru.key /etc/nginx/ssl/mysite.ru/mysite_ru.key
  
  RUN apk update \
  &amp;&amp; ln -sf ./nginx/ssl/mysite.ru /etc/nginx/ssl/mysite.ru
  
  ADD ./nginx/nginx.conf /etc/nginx/nginx.conf
  ADD ./nginx/default.conf /etc/nginx/conf.d/default.conf
  </code></pre>
  <p>the <code>./nginx/ssl/mysite_com</code> folder contains working files: <code>mysite_com. crt</code> and <code>mysite_com.key</code>
  This files checked without docker</p>
  <p><strong>docker-compose.yml</strong></p>
  <pre><code>services:
    site:
      build:
        context: .
        dockerfile: nginx.dockerfile
      container_name: nginx
      ports:
        - 80:80
        - 443:443
      volumes:
        - ./src:/var/www/html:delegated
        - ./nginx/ssl:/etc/nginx/ssl
      depends_on:
        - php
        - mysql
        - postgres
      networks:
        - laravel
  </code></pre>
  <p><strong>default.conf</strong></p>
  <pre><code>server {
      listen 443 ssl;
      server_name  mysite.ru;
      ssl_certificate /etc/nginx/ssl/mysite.ru/mysite_ru.crt;
      ssl_certificate_key /etc/nginx/ssl/mysite.ru/mysite_ru.key;
      index index.php index.html;
      root /var/www/html/public;
  
          location / {
          try_files $uri $uri/ /index.php?$query_string;
      }
  
      location ~ \.php$ {
          try_files $uri =404;
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass php: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>Tell me, what is the error?
  and where can I view nginx logs in docker?</p>