


To create a self-signed certificate using OpenSSL only for local-docker with an expirationdate 1 year in the future you can use this command openssl req -x509 -new -out mycert.crt -keyout mycert.key -days 365 -newkey rsa:4096 -sha256 -nodesĪnd answer the questions to your best knowledge. adding this hostname to the line starting with 127.0.0.1 127.0.0.1 localhost local-dockerĢ - create a certificate + key matching this hostname RUN docker-php-ext-install mysqli & docker-php-ext-enable mysqli & docker-php-ext-install pdo_mysqlġ - add a line to your computer’s host file ( /etc/hosts for Linux C:\Windows\System32\drivers\etc\hosts for Windows) pointing the desired name to 127.0.0.1, i.e. I’ve found a lot of solutions that involve adding a reverse proxy but I’m not sure if this is exactly what I’m looking for. In addition to this I would like to enable SSL certificates for this local domain. I currently have a simple docker setup in which I’m using PHP:7.3.30-apache and I’m able to view my website at What is the best way to create a custom domain like “ instead of localhost?
