项目作者: GerardBalaoro

项目描述 :
Apache Virtual Host Manager
高级语言: Python
项目地址: git://github.com/GerardBalaoro/VHoster.git
创建时间: 2019-03-29T06:19:58Z
项目社区:https://github.com/GerardBalaoro/VHoster

开源协议:MIT License

下载


VHoster


Apache Virtual Host Manager



Usage

  1. Usage: vhoster [OPTIONS] COMMAND [ARGS]...
  2. Apache Virtual Host Manager
  3. https://github.com/GerardBalaoro/VHoster
  4. Copyright (c) Gerard Balaoro
  5. Options:
  6. -v, --version Show the version and exit.
  7. -h, --help Show this message and exit.
  8. Commands:
  9. config Manage configuration variables
  10. explore Browse current site path or site registered to DOMAIN
  11. forget (remove) Unregister the current (or specified) PATH or DOMAIN
  12. link Link current working directory to domain
  13. list List all registered sites
  14. open Open current site or site registered to DOMAIN in browser
  15. park (create) Register the current (or specified) PATH to given DOMAIN
  16. rebuild Rebuild all site configuration files
  17. refresh Refresh configuration files of the site
  18. secure Secure the site with a trusted TLS certificate
  19. set-root Set document root for the site
  20. share Generable public url for the site
  21. show Display site information
  22. start Restart all or specified services
  23. stop Stop all or specified services

Installation

  1. pip install git+https://github.com/GerardBalaoro/VHoster#egg=VHoster

Build Executable Using PyInstaller

  1. pip install -U pyinstaller
  2. py build.py

Configuration

The application will load the settings inside the config.json file in the user app data directory.

  1. {
  2. "dns": {
  3. // Path to HOSTS File
  4. "file": "C:/Windows/System32/drivers/etc/hosts"
  5. },
  6. "apache": {
  7. // Path to Apache Executable
  8. "bin": "C:/Xampp/apache/bin/httpd.exe",
  9. // Path to Apache Configuration File
  10. "conf": "C:/Xampp/apache/conf/extra/httpd-vhosts.conf"
  11. },
  12. "paths": {
  13. // Where to store individual *.conf files
  14. "conf": "C:/Xampp/apache/sites/conf",
  15. // Where to store generated certificates and keys
  16. "certs": "C:/Xampp/apache/sites/certs"
  17. },
  18. "ngrok": {
  19. // Path to ngrok configuration file
  20. "config": "%USERPROFILE%/.ngrok2/ngrok.yml"
  21. },
  22. "sites": [
  23. {
  24. "domain": "localhost.test",
  25. // Working directory
  26. "path": "C:/Xampp/htdocs/",
  27. // Document root (if different from path)
  28. "root": "",
  29. "secure": true
  30. }
  31. ]
  32. }

This application needs administrative privileges in order to access the Windows Hosts File

Credits