title: Laravel + Vite + Sail over HTTPS. Possible?
body: <p>After several hours to try things, I think I'm too much confuse to understand what's going wrong... The title explain perfectly what I'm trying to make working.
  My <code>docker-compose.yml</code>:</p>
  <pre class="lang-yaml prettyprint-override"><code>version: '3'
  services:
      mysite.test:
          build:
              context: ./docker/8.1
              dockerfile: Dockerfile
              args:
                  WWWGROUP: '${WWWGROUP}'
          image: sail-8.1/app
          extra_hosts:
              - 'host.docker.internal:host-gateway'
          ports:
              - '${APP_PORT:-80}:80'
              - '443:443' //added for test but not working...
              - '${HMR_PORT:-8080}:8080'
              - '5173:5173' //Vite port
          environment:
              WWWUSER: '${WWWUSER}'
              LARAVEL_SAIL: 1
              XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
              XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
          volumes:
              - '.:/var/www/html'
          networks:
              - sail
          depends_on:
              - mysql
              - minio
      mysql:
          image: 'mysql/mysql-server:8.0'
          ports:
              - '${FORWARD_DB_PORT:-3306}:3306'
          environment:
              MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
              MYSQL_ROOT_HOST: &quot;%&quot;
              MYSQL_DATABASE: '${DB_DATABASE}'
              MYSQL_USER: '${DB_USERNAME}'
              MYSQL_PASSWORD: '${DB_PASSWORD}'
              MYSQL_ALLOW_EMPTY_PASSWORD: 1
          volumes:
              - 'sail-mysql:/var/lib/mysql'
              - './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
          networks:
              - sail
          healthcheck:
              test: [&quot;CMD&quot;, &quot;mysqladmin&quot;, &quot;ping&quot;, &quot;-p${DB_PASSWORD}&quot;]
              retries: 3
              timeout: 5s
  networks:
      sail:
          driver: bridge
  volumes:
      sail-nginx:
          driver: local
      sail-mysql:
          driver: local
  </code></pre>
  <p>My <code>vite.config.js</code>:</p>
  <pre class="lang-js prettyprint-override"><code>import { defineConfig } from 'vite';
  import laravel from 'laravel-vite-plugin';
  
  export default defineConfig({
      server: {
          https: true,
          host: '0.0.0.0'
      },
      plugins: [
          laravel({
              input: [
                  'resources/css/app.css',
                  'resources/js/app.js',
              ],
              refresh: true
          }),
      ],
  });
  </code></pre>
  <p>My <code>.env</code>:</p>
  <pre class="lang-yaml prettyprint-override"><code>(...)
  APP_URL=https://mysite.test
  APP_SERVICE=mysite.test
  (...)
  </code></pre>
  <p>The result of that configuration is it working with <a href="http://mysite.test" rel="nofollow noreferrer">http://mysite.test</a> but not in https. That return:</p>
  <p><strong>This site can’t be reached</strong></p>
  <p><strong>mysite.test unexpectedly closed the connection.</strong></p>
  <p>Does anyone have a tips for me? 
  Thank you!</p>