Laravel + Vite + Sail over HTTPS. Possible?

Stefan Bogdanescu

Founder & Senior Architect · 2026-06-29

Laravel Company
# Laravel + Vite + Sail over HTTPS: The Reality of Docker Networking As a senior developer, I often encounter situations where a seemingly simple configuration breaks down into complex networking puzzles. Trying to achieve a specific goal—like serving a Laravel application via HTTPS within a Dockerized environment using Sail and Vite—can quickly lead to confusion about which layer is responsible for what. The setup you’ve provided highlights a common stumbling block: setting the `vite.config.js` to use HTTPS doesn't automatically configure the underlying web server (like Nginx, which is typically used in production Docker setups) to handle SSL termination correctly across the network boundary. Let's dive into why your attempt fails