apache-vhost-generator

1.0.2 • Public • Published

Apache VHost Generator

npm install -g apache-vhost-generator

A virtual host file generator for Linux machine with Apache2

Requires administrative rights *

Commands:

  • --help -h Help
  • --create -c Create new virtual host
  • --remove -r Remove a vhost by domain

Options:

  • --domain -d Domain **
  • --path -p Path to project root, default: curent working directory
  • --public Public folder, ex: public_html, web, public, default: none
  • --ip The IP for vhost, default: *
  • --port The access port for vhost, default: 80
  • --ssl -s Secure vhost, default: false
  • --php -v Set PHP Version, default: 7.4
  • --index -i Create index.html in Project Root, default: false
  • --sslr Add RewriteRule http to https, default: true (When vhost is https)
  • --template Template of virtual host file, default: default ** required

Example:

sudo vhost -c -s -i -d test-dev.com -v 7.2 -p /var/www/devtest
Note: If the directory does not exist it is created automatically

Templates

You can add your own virtual host template in templates folder under project_root/lib For ssl templates add '-ssl' at the end of the filename

Auto backup

When you create a new virtual host, a backup with your old settings for hosts and ports.conf are saved in project_root/lib/backup

Based on the project of Marinct

Package Sidebar

Install

npm i apache-vhost-generator

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

16.5 kB

Total Files

8

Last publish

Collaborators

  • andygotfridt