vhost-add

0.1.0 • Public • Published

Vhost Add

A command tool to create virtual host for apache and nginx.

npm version David deps node version

Usage

Firt you should given some envrionment variables:

  • NGINX_BIN_DIR The directory of nginx executable file.
  • NGINX_VHOST_DIR The diretory of nginx virtual host files.
  • APACHE_BIN_DIR The directory of apache executable file.
  • APACHE_VHOST_DIR The diectory of apache virtual host files.

If you use it for creating apache vhost, the variables APACHE_BIN_DIR and APACHE_VHOST_DIR must be exist, and when you use nginx ,the variables NGINX_BIN_DIR and NGINX_VHOST_DIR are also needed.

Usage: vhost-add [options]

Options:
  -V, --version          output the version number
  -d, --domain [domain]  The local domain of your site (default: "localhost")
  -p --port [port]       The port of your site (default: 80)
  -r, --root [root]      The root path of your site (default: ".")
  -s, --server [server]  The server type (default: "nginx")
  -h, --help             output usage information

Known issues

not installed service name "Apache2.2"

You may meet with the error of not installed service name "Apache2.2". It cased by not installing apache as a service. Just run httpd -k install -n Apache2.2 can resolve it. But If you have installed the service already, run regedit and find the apache service from HKEY_LOCAL_MACHINE\SYSTEM\Services and then rename it to Apache2.2.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i vhost-add

    Weekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    27.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • whyun-master