I am working on a website where I will use langage subdomains. Let's say my website domain in laragon is mysite.dev, I want to have any subdomains ending in the same directory as the root domain.
Even though laragon virtualhost seems to do the wildcard thingy, I can't get any subdomain working unless i edit my hosts file like so :
127.0.0.1 localhost
127.0.0.1 mysite.dev #laragon magic!
127.0.0.1 en.mysite.dev #laragon magic!
With this very host file, mysite.dev and en.mysite.dev will work but not de.mysite.dev. And there is no way to do a wilcard thingy in the hosts file. Do you have any clues ?
Here is my mysite.dev vhosts file :
define ROOT "C:/laragon/www/mysite/public/"
define SITE "mysite.dev"
<VirtualHost *:80>
DocumentRoot "${ROOT}"
ServerName ${SITE}
ServerAlias *.${SITE}
<Directory "${ROOT}">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "${ROOT}"
ServerName ${SITE}
ServerAlias *.${SITE}
<Directory "${ROOT}">
AllowOverride All
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile C:/laragon/etc/ssl/mysite.dev.crt
SSLCertificateKeyFile C:/laragon/etc/ssl/mysite.dev.key
</VirtualHost>