{"id":18616051,"url":"https://github.com/bjoern-hempel/apache-host-viewer","last_synced_at":"2026-04-18T17:31:46.258Z","repository":{"id":110076140,"uuid":"91079859","full_name":"bjoern-hempel/apache-host-viewer","owner":"bjoern-hempel","description":"An apache host viewer to list all provided hosts and vhosts on current system.","archived":false,"fork":false,"pushed_at":"2017-07-25T23:12:23.000Z","size":101,"stargazers_count":3,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T02:06:21.507Z","etag":null,"topics":["analyzer","apache2","bash","certificate","checker","domain","friends-of-bash","html","json","markup","mit-license","service","ssl","systeminfo","vhost"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bjoern-hempel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-12T10:24:19.000Z","updated_at":"2020-12-19T17:52:29.000Z","dependencies_parsed_at":"2023-04-18T11:07:41.214Z","dependency_job_id":null,"html_url":"https://github.com/bjoern-hempel/apache-host-viewer","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/bjoern-hempel/apache-host-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Fapache-host-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Fapache-host-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Fapache-host-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Fapache-host-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjoern-hempel","download_url":"https://codeload.github.com/bjoern-hempel/apache-host-viewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Fapache-host-viewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31977964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analyzer","apache2","bash","certificate","checker","domain","friends-of-bash","html","json","markup","mit-license","service","ssl","systeminfo","vhost"],"created_at":"2024-11-07T03:33:55.044Z","updated_at":"2026-04-18T17:31:46.233Z","avatar_url":"https://github.com/bjoern-hempel.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An apache host viewer\n\nAn apache host viewer to list all provided host and vhosts on current system.\n\n## A.) First usage\n\n### A.1) installation\n\nThis application uses the friends of bash libraries (https://github.com/bjoern-hempel/friends-of-bash). Check that the libraries are available:\n\n```\nuser$ friends-of-bash --version\nfriends-of-bash/v0.0.11\n```\n\nIf you can see a similar friends of bash version output like above, you can now install this application:\n\n```\nuser$ sudo -E friends-of-bash install \"git@github.com:bjoern-hempel/apache-host-viewer.git\"\n```\n\nIf you don't have installed the friends of bash libraries, please install them first. In short:\n\n```\nuser$ cd ~ \u0026\u0026 git clone git@github.com:bjoern-hempel/friends-of-bash.git \u0026\u0026 cd friends-of-bash\nuser$ sudo -E bin/install\nuser$ cd .. \u0026\u0026 rm -rf friends-of-bash\n```\n\n## 1.) Usage\n\n### 1.1) Show the help dialog (`--help`)\n\n```\nuser$ apache-host-viewer --help\n\nAn apache host viewer (v0.0.36) by Björn Hempel \u003cbjoern@hempel.li\u003e.\n\nUsage: apache-host-viewer [options...]\n -h,    --help                    Shows this help.\n -v,    --version                 Shows the version number.\n\n -l,    --only-list-domains       Only list the domains, that are available on this system.\n\n -m,    --markdown                Shows the output as markdown and disable all other output types (json, html) - default output\n -j,    --json                    Shows the output as json and disable all other output types (markdown, html)\n        --html                    Shows the output as html and disable all other output types (markdown, json)\n        --compress-json           Compress the outputted json.\n\n        --output-target           Writes also the result into this target folder.\n        --output-name             Set the output name (default is \"index\").\n        --create-markdown         Creates a markdown file (--output-target must be set).\n        --create-json             Creates a json file (--output-target must be set).\n        --create-html             Creates a html file (--output-target must be set).\n\n -i,    --install-live-view       Installs the live view api.\n\n -s,    --show-system-info        Shows system informations.\n        --show-links              Shows links inside the markdown and html file.\n        --show-ssl-certificates   Shows the ssl certificates.\n        --show-domain-list        Shows a separated domain list.\n\n -d,    --docker-container        Checks a docker machine instead of the local machine.\n\n        --disable-vhost-parser    Disable the vhost parser.\n\n        --silence                 Disable the output.\n```\n\n### 1.2) Simply get all DocumentRoots as markdown markup language\n\nThe script uses the DUMP_VHOSTS function from `apachectl` (`apachectl -S`). This requires sudo credentials:\n\n```\nuser$ sudo apache-host-viewer\n```\n\nThe markdown result could be:\n\n```\n### Projects\n\n- file:///var/www/de/rsm-live/wmbw/start-up-bw/www/html/current/web\n  - targets:\n    - http://www.start-up-bw.wmbw.rsm-live.de\n    - http://start-up-bw.wmbw.rsm-live.de\n    - https://www.start-up-bw.wmbw.rsm-live.de\n    - https://start-up-bw.wmbw.rsm-live.de\n  - ssl: true\n  - app: HTML project\n  - version: unknown\n- file:///var/www/html\n  - targets:\n    - http://wmbw.rsm-live.de\n    - http://www.wmbw.rsm-live.de\n    - http://wmbw.rsm-live.de\n    - https://www.wmbw.rsm-live.de\n    - https://wmbw.rsm-live.de\n  - ssl: true\n  - app: HTML project\n  - version: unknown\n- https://www.startupgipfel.de/registration/\n  - targets:\n    - http://www.start-up-bw.de\n    - http://start-up-bw.de\n    - http://www.startupbw.de\n    - http://startupbw.de\n  - ssl: false\n  - app: redirection\n  - version: not available\n- file:///var/www/de/rsm-stage/wmbw/start-up-bw/www/html/current/web\n  - targets:\n    - http://www.start-up-bw.wmbw.rsm-stage.de\n    - http://start-up-bw.wmbw.rsm-stage.de\n    - https://www.start-up-bw.wmbw.rsm-stage.de\n    - https://start-up-bw.wmbw.rsm-stage.de\n  - ssl: true\n  - app: TYPO3\n  - version: 8.7.1\n```\n\n### 1.3) HTML output (`--html`)\n\nThe script uses the DUMP_VHOSTS function from `apachectl` (`apachectl -S`). This requires sudo credentials:\n\n```\nuser$ sudo apache-host-viewer --html\n```\n\nThe markdown result could be:\n\n```\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n    \u003chead\u003e\n        \u003c!--[if IE]\u003e                                                                                                                                                   \n        \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"\u003e\n        \u003c![endif]--\u003e\n        \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\" /\u003e\n        \u003cmeta charset=\"UTF-8\" /\u003e\n        \u003ctitle\u003ewmbw.rsm-live.de\u003c/title\u003e\n        \u003clink rel=\"stylesheet\" href=\"markdown.css\"\u003e\n        \u003cstyle\u003e\n            .markdown-body {\n                box-sizing: border-box;\n                min-width: 200px;\n                max-width: 980px;\n                margin: 0 auto;\n                padding: 45px;\n            }\n        \u003c/style\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003carticle class=\"markdown-body\"\u003e\n\u003ch3 id=\"projects\"\u003eProjects\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003efile:///var/www/de/rsm-live/wmbw/start-up-bw/www/html/current/web\u003cul\u003e\n\u003cli\u003etargets:\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.start-up-bw.wmbw.rsm-live.de\"\u003ehttp://www.start-up-bw.wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://start-up-bw.wmbw.rsm-live.de\"\u003ehttp://start-up-bw.wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.start-up-bw.wmbw.rsm-live.de\"\u003ehttps://www.start-up-bw.wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://start-up-bw.wmbw.rsm-live.de\"\u003ehttps://start-up-bw.wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003essl: true\u003c/li\u003e\n\u003cli\u003eapp: HTML project\u003c/li\u003e\n\u003cli\u003eversion: unknown\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003efile:///var/www/html\u003cul\u003e\n\u003cli\u003etargets:\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://wmbw.rsm-live.de\"\u003ehttp://wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://www.wmbw.rsm-live.de\"\u003ehttp://www.wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://wmbw.rsm-live.de\"\u003ehttp://wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.wmbw.rsm-live.de\"\u003ehttps://www.wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://wmbw.rsm-live.de\"\u003ehttps://wmbw.rsm-live.de\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003essl: true\u003c/li\u003e\n\u003cli\u003eapp: HTML project\u003c/li\u003e\n\u003cli\u003eversion: unknown\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.startupgipfel.de/registration/\"\u003ehttps://www.startupgipfel.de/registration/\u003c/a\u003e\u003cul\u003e\n\u003cli\u003etargets:\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.start-up-bw.de\"\u003ehttp://www.start-up-bw.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://start-up-bw.de\"\u003ehttp://start-up-bw.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://www.startupbw.de\"\u003ehttp://www.startupbw.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://startupbw.de\"\u003ehttp://startupbw.de\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003essl: false\u003c/li\u003e\n\u003cli\u003eapp: redirection\u003c/li\u003e\n\u003cli\u003eversion: not available\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003efile:///var/www/de/rsm-stage/wmbw/start-up-bw/www/html/current/web\u003cul\u003e\n\u003cli\u003etargets:\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://www.start-up-bw.wmbw.rsm-stage.de\"\u003ehttp://www.start-up-bw.wmbw.rsm-stage.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://start-up-bw.wmbw.rsm-stage.de\"\u003ehttp://start-up-bw.wmbw.rsm-stage.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://www.start-up-bw.wmbw.rsm-stage.de\"\u003ehttps://www.start-up-bw.wmbw.rsm-stage.de\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://start-up-bw.wmbw.rsm-stage.de\"\u003ehttps://start-up-bw.wmbw.rsm-stage.de\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003essl: true\u003c/li\u003e\n\u003cli\u003eapp: TYPO3\u003c/li\u003e\n\u003cli\u003eversion: 8.7.1\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/article\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\n### 1.4) JSON output (`--json`)\n\nThe script uses the DUMP_VHOSTS function from `apachectl` (`apachectl -S`). This requires sudo credentials:\n\n```\nuser$ sudo apache-host-viewer --json\n```\n\nThe markdown result could be:\n\n```\n{\n    \"projects\": {\n        \"file:///var/www/de/rsm-live/wmbw/start-up-bw/www/html/current/web\": {\n            \"domains\": [\n                \"http://www.start-up-bw.wmbw.rsm-live.de\",\n                \"http://start-up-bw.wmbw.rsm-live.de\",\n                \"https://www.start-up-bw.wmbw.rsm-live.de\",\n                \"https://start-up-bw.wmbw.rsm-live.de\"\n            ],\n            \"ssl\": true,\n            \"app\": \"HTML project\",\n            \"version\": \"unknown\"\n        },\n        \"file:///var/www/html\": {\n            \"domains\": [\n                \"http://wmbw.rsm-live.de\",\n                \"http://www.wmbw.rsm-live.de\",\n                \"http://wmbw.rsm-live.de\",\n                \"https://www.wmbw.rsm-live.de\",\n                \"https://wmbw.rsm-live.de\"\n            ],\n            \"ssl\": true,\n            \"app\": \"HTML project\",\n            \"version\": \"unknown\"\n        },\n        \"https://www.startupgipfel.de/registration/\": {\n            \"domains\": [\n                \"http://www.start-up-bw.de\",\n                \"http://start-up-bw.de\",\n                \"http://www.startupbw.de\",\n                \"http://startupbw.de\"\n            ],\n            \"ssl\": false,\n            \"app\": \"redirection\",\n            \"version\": \"not available\"\n        },\n        \"file:///var/www/de/rsm-stage/wmbw/start-up-bw/www/html/current/web\": {\n            \"domains\": [\n                \"http://www.start-up-bw.wmbw.rsm-stage.de\",\n                \"http://start-up-bw.wmbw.rsm-stage.de\",\n                \"https://www.start-up-bw.wmbw.rsm-stage.de\",\n                \"https://start-up-bw.wmbw.rsm-stage.de\"\n            ],\n            \"ssl\": true,\n            \"app\": \"TYPO3\",\n            \"version\": \"8.7.1\"\n        }\n    }\n}\n```\n\n### 1.5) Add some additional system informations (`--show-system-info`)\n\nThe script uses the DUMP_VHOSTS function from `apachectl` (`apachectl -S`). This requires sudo credentials:\n\n```\nuser$ sudo apache-host-viewer --show-system-info\n```\n\nThe markdown result could be:\n\n```\n### System informations\n\n| Name | Value |\n| ---- | ----- |\n| document created at | 2017-05-28 16:38:38 |\n| full os name | Linux Debian 8.8 (3.16.0-4-amd64 x86_64) |\n| number of cpus | 4 |\n| ram size in gb | 15.6774 |\n| hd disc size in gb | 219 |\n| used hd disc size | 2 % |\n| number of updateable applications | 0 |\n| php version | 7.0.19-1~dotdeb+8.1 |\n| mysql version | 5.5.55 |\n\n### Users\n\n| Username | Fullname |\n| ---- | ----- |\n| bjoern | Björn Hempel |\n| user2 | User 2 |\n| user3 | User 3 |\n\n### Projects\n\n- file:///var/www/de/rsm-live/wmbw/start-up-bw/www/html/current/web\n  - targets:\n    - http://www.start-up-bw.wmbw.rsm-live.de\n    - http://start-up-bw.wmbw.rsm-live.de\n    - https://www.start-up-bw.wmbw.rsm-live.de\n    - https://start-up-bw.wmbw.rsm-live.de\n  - ssl: true\n  - app: HTML project\n  - version: unknown\n- file:///var/www/html\n  - targets:\n    - http://wmbw.rsm-live.de\n    - http://www.wmbw.rsm-live.de\n    - http://wmbw.rsm-live.de\n    - https://www.wmbw.rsm-live.de\n    - https://wmbw.rsm-live.de\n  - ssl: true\n  - app: HTML project\n  - version: unknown\n- https://www.startupgipfel.de/registration/\n  - targets:\n    - http://www.start-up-bw.de\n    - http://start-up-bw.de\n    - http://www.startupbw.de\n    - http://startupbw.de\n  - ssl: false\n  - app: redirection\n  - version: not available\n- file:///var/www/de/rsm-stage/wmbw/start-up-bw/www/html/current/web\n  - targets:\n    - http://www.start-up-bw.wmbw.rsm-stage.de\n    - http://start-up-bw.wmbw.rsm-stage.de\n    - https://www.start-up-bw.wmbw.rsm-stage.de\n    - https://start-up-bw.wmbw.rsm-stage.de\n  - ssl: true\n  - app: TYPO3\n  - version: 8.7.1\n```\n\nYou can use this parameter in combination with all other parameters (--markdown, --json, --html, --create-markdown, --create-json, --create-html).\n\n### 1.6) Create md file into a given folder (`--output-target`)\n\nThe following command will create a markdown file (`index.md`) into the folder `/var/ww/html/server`. The following command also prints the markdown result on the screen:\n\n```\nuser$ sudo apache-host-viewer --output-target=/var/www/html/server --output-name=index\n```\n\n### 1.7) What's with json and html files? (`--create-json` and `--create-html`)\n\nHere it comes. It will also create a `index.html` and a `index.json` file into the folder `/var/ww/html/server`:\n\n```\nuser$ sudo apache-host-viewer --output-target=/var/www/html/server --output-name=index --create-json --create-html\n```\n\n### 1.8) Suppress the default output (`--silence`)\n\nYou can suppress all outputs (except error messages) with the parameter `--silence`. This is usefull if you like to use this command as a cronjob task. The following command creates a md, a json and a html file into the folder `/var/www/html/server` and don't output any message to the command line:\n\n```\nuser$ sudo apache-host-viewer --output-target=/var/www/html/server --output-name=index --show-system-info --show-links --create-json --create-html --silence\n```\n\n### 1.9) Check docker container instead of local system\n\nTODO..\n\n## B.) License\n\nMIT © [Björn Hempel](https://www.ixno.de)\n\nHave fun! :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoern-hempel%2Fapache-host-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjoern-hempel%2Fapache-host-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoern-hempel%2Fapache-host-viewer/lists"}