Dans le dossier C:\Windows\System32\drivers\etc
, éditer le fichier host
et y ajouter le nom de domaine du projet local.
# WP HEADLESS
127.0.0.1 headlesswp.local
127.0.0.1 app.headlesswp.local
Dans le dossier C:\laragon\etc\apache2\sites-enabled
créer les fichiers headlesswp.local.conf et app.headlesswp.local.conf
headlesswp.local.conf
define ROOT "C:/laragon/www/headlesswp/front/public"
define SITE headlesswp.local
<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/laragon.crt
SSLCertificateKeyFile C:/laragon/etc/ssl/laragon.key
</VirtualHost>
app.headlesswp.local.conf
define ROOT "C:/laragon/www/headlesswp/back/"
define SITE app.headlesswp.local
<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/laragon.crt
SSLCertificateKeyFile C:/laragon/etc/ssl/laragon.key
</VirtualHost>