abo3adel / vhost
v1.2.0
2019-09-10 12:42 UTC
Requires
- php: ^7.3
- symfony/console: ^4.2.11
README
一键为apache创建虚拟主机
🔧 安装
使用Composer全局安装以获得最佳性能
composer global require abo3adel/vhost
❗ 要求
- php: 7.3或更高版本
- symfony/console: 3.4.23
✨ 使用方法
❗ 注意: 以管理员身份运行
有两种方法
📠 选项方式
C:\xampp\htdocs\project> vhost add -s "project.test" Creating Virtual Host From this data ======================================== ------------------------------------------------------------ ServerName project.test ------------------------------------------------------------ DocumentRoot "C:\xampp\htdocs\project" ------------------------------------------------------------ ServerAdmin ------------------------------------------------------------ ServerAlias ------------------------------------------------------------ ErrorLog "" ------------------------------------------------------------ CustomLog "" ------------------------------------------------------------ Existing Application, GoodBuy.
所有可用选项
- add [-s|--server [服务器名称]] [必需]
- [-d|--dir [服务器目录路径]] [可选] 默认为 当前目录
- [-a|--admin [管理员邮箱]] [可选]
- [-l|--alias [服务器别名]] [可选]
- [-e|--error-log [错误日志]] [可选]
- [-c|--custom-log [自定义日志]] [可选]
C:\xampp\htdocs\project> vhost add -s "project.test" -d "C:\xampp\htdocs\someOtherApp" -a "example@some.com" -l "dev.preoject.test" -e "path/to/error/file.log" -c "path/to/custom/file.log"
🎁 交互模式
C:\xampp\htdocs\project> vhost i Creating Virutal Host From this data ==================================== Server Name ["project.com"]: > Server Directory ["C:\xampp\htdocs\project"]: > Server Admin Email []: > Server Alias []: > Error Log File []: > Custom Log File []: >
待办事项
- 支持Linux和macOS