项目作者: Sanskuy

项目描述 :
cmd-virtual-host
高级语言: Batchfile
项目地址: git://github.com/Sanskuy/CmdVirtualHost.git
创建时间: 2018-10-16T22:27:55Z
项目社区:https://github.com/Sanskuy/CmdVirtualHost

开源协议:

下载


💻 CmdVirtualHost
Create Apache virtual host using command line for Laragon.

⬇ Installation:
Download the raw apvh.bat file from here and add it to the system path.

📝 Before use:
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/

🔨 Usage:
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}

⚙ Where:
sitename: Sitename containing the .domain name.
directory: The full (absolute) path to the site directory.
ssl: Use ssl to have the virtual host for SSL else empty.

🧠 Remember:
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 in alt_names section in the openssl template file (for me: F:\laragon\usr\tpl\openssl.conf.tpl)

😊 Happy coding!
🙏