Skip to content
/ vhost Public

simple and easy composer Library to create virtual hosts as cli app

License

Notifications You must be signed in to change notification settings

ahmdadl/vhost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💻 Virtual Hosts Cli

Create Virtual Hosts for apache with one click

🔧 Installation

Install with Composer as global for best perfomance

composer global require abo3adel/vhost

❗ Reqirements:

  • php: 7.3 or newer
  • symfony/console: 3.4.23

✨ Usage

❗ Note: Run as Administrator

trailer image

There are two ways:

📠 Options Way:

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]
    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"

🎁 Interactive Mode:

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 []:
 >

TODO:

  • support linux and macOs