Create Apache virtual host using command line for Laragon.
Download the raw apvh.bat file from here and add it to the system path.
Change the SSL files directory on line 9 according to yours.
i.e. set SSL_PATH=F:/laragon/etc/ssl/ -> set SSL_PATH=Your/Laragon/installation/path/etc/ssl/
Open the Terminal and cd into the directory where all your virtual hosts are stored. (for me: F:\laragon\etc\apache2\sites-enabled)
apvh {sitename} {directory} {ssl}
- sitename: Sitename containing the .domain name.
- directory: The full (absolute) path to the site directory.
- ssl: Use
sslto have the virtual host for SSL else empty.
- The site directory name must not contain trailing slahes (\ or /).
- This script assumes that you have added the virtual host entry to hosts (
C:\Windows\System32\drivers\etc) file and inalt_namessection in the openssl template file (for me:F:\laragon\usr\tpl\openssl.conf.tpl)
- apvh === Apache virtual host.
- India == Indians never delay in anything.
π