Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmdadl/vhost
simple and easy composer Library to create virtual hosts as cli app
https://github.com/ahmdadl/vhost
cli cli-app composer hosts hosts-file php7 symfony-console virtual-hosts windows xammp
Last synced: about 1 month ago
JSON representation
simple and easy composer Library to create virtual hosts as cli app
- Host: GitHub
- URL: https://github.com/ahmdadl/vhost
- Owner: ahmdadl
- License: apache-2.0
- Created: 2019-09-08T13:00:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-10T12:45:51.000Z (over 5 years ago)
- Last Synced: 2024-11-15T21:42:45.050Z (about 2 months ago)
- Topics: cli, cli-app, composer, hosts, hosts-file, php7, symfony-console, virtual-hosts, windows, xammp
- Language: PHP
- Homepage:
- Size: 1.05 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :computer: Virtual Hosts Cli
Create Virtual Hosts for apache with one click## :wrench: Installation
Install with Composer as global for best perfomance
```
composer global require abo3adel/vhost
```
#### :heavy_exclamation_mark: Reqirements:
* php: 7.3 or newer
* symfony/console: 3.4.23## :sparkles: Usage
**:heavy_exclamation_mark: Note:** Run as Administrator![trailer image](https://github.com/abo3adel/vhost/blob/master/trailer.gif)
There are two ways:
### :fax: Options Way:
```ps
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.
```#### All Avaliable options:
* add [-s|--server **[Server Name]**] **[Required]**
* [-d|--dir [Path to Server Directory]] **[Optinal]** Defaults to **CurrentDirectory**
* [-a|--admin **[Admin Email]**] **[Optinal]**
* [-l|--alias **[Server Alias]**] **[Optinal]**
* [-e|--error-log **[Error Log]**] **[Optinal]**
* [-c|--custom-log **[Custom Log]**] **[Optinal]**
```ps
C:\xampp\htdocs\project> vhost add -s "project.test" -d "C:\xampp\htdocs\someOtherApp" -a "[email protected]" -l "dev.preoject.test" -e "path/to/error/file.log" -c "path/to/custom/file.log"
```
---
### :gift: Interactive Mode:
```ps
C:\xampp\htdocs\project> vhost iCreating 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 []:
>```
## TODO:
* support linux and macOs