by Jose Luis Chafardet Grimaldi
[email protected]
A simple PHP script to create Apache virtualhosts based on Symfony 4 Console Component.
Please be aware that this script is not meant for production environments!
I wrote it for development purposes.
(to speed up the process of configuring Apache).
-
Create working console code -
Changed display output for the results. -
Add configuration file (for distro specific information) -
Add counter to prioritize virtualhost loading (in which order the virtualhosts will be loaded by Apache / nginx)
-
Add virtualhost template -
Parse virtualhost template and replace the variables with the input -
Save Apache / nginx .conf file with the parameters given by the user to the proper directory
-
Add support for nginx - request by a good friend
-
Print to the screen the outcome of the process -
Add variable in the configuration file to switch between Argument and Question based execution of the script.
-
Compile a .phar file and add it to bin/release folder
-
Add support for framework parameter (symfony, laravel only for now) -
Add ability to determine "current server" IP address as to remove it from manually configuring it in the config file
-
Finish the CONTRIBUTING.md file
-
Finish the CODE_OF_CONDUCT.md file
Please note that the configuration loading prioritization will be
automatic, there will be no "manual" prioritization.
At least is not in the plans for any of the inmediate future versions.
From the console type:
bin/virtualhost create hostname directory(optional)
The script receives 2 parameters, one is mandatory hostname, and the second is optional folder
bin/virtualhost create hostname folder
sample output (Includes a view of the parsed Apache / nginx configuration file):
If no second parameter is given, it will use the hostname for the folder name.
sample output:
- Send questions through the issues tracker.
- suggestions through pull requests (please describe the suggestion accurately and briefly.)