{"id":22974436,"url":"https://github.com/diversen/apache2-host-enabler","last_synced_at":"2025-04-02T07:25:12.355Z","repository":{"id":138270515,"uuid":"220644163","full_name":"diversen/apache2-host-enabler","owner":"diversen","description":"Some scripts written in PHP for enabling and disabling Apache2 hosts on Ubuntu (or maybe other debian systems) ","archived":false,"fork":false,"pushed_at":"2022-06-27T12:21:39.000Z","size":180,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T22:28:39.471Z","etag":null,"topics":["apache2-host-create","apache2-host-enabler"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diversen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-11-09T13:11:43.000Z","updated_at":"2023-03-17T12:20:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8c814c6-cdab-47f3-9ac4-7bc660b30a13","html_url":"https://github.com/diversen/apache2-host-enabler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fapache2-host-enabler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fapache2-host-enabler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fapache2-host-enabler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fapache2-host-enabler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diversen","download_url":"https://codeload.github.com/diversen/apache2-host-enabler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246771771,"owners_count":20831099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["apache2-host-create","apache2-host-enabler"],"created_at":"2024-12-15T00:00:41.595Z","updated_at":"2025-04-02T07:25:12.349Z","avatar_url":"https://github.com/diversen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apache2-host-enabler\n\nEnable and disable virtual hosts on Linux (Only tested on Ubuntu)\n\nIt only works for apache2 version \u003e= 2.4.x\n\nIt creates the apache2 configuration file, and add the host to /etc/hosts, \nand then enable the configuration.\n\nIt also creates `logs/` and `htdocs/` dir.\n\nOnly tested on Ubuntu, and it may not work for your setup. \n\n## Download phar\n\nYou can also just clone this repo and build it - or copy it from the repo. \n\n    wget https://github.com/diversen/apache2-host-enabler/raw/master/a2host.phar\n\n    sudo cp a2host.phar /usr/local/bin/a2host.phar\n\n    sudo chmod +x /usr/local/bin/a2host.phar\n\n## Or Build phar\n\nYou will need to have this great tool installed: https://github.com/clue/phar-composer\n\n    git clone https://github.com/diversen/apache2-host-enabler \n\n    cd apache2-host-enabler \n\n    composer install\n\n    cd ..\n\n    phar-composer build apache2-host-enabler a2host.phar\n\n`a2host.phar` then created.\n\n## Usage\n\nEnable:\n\n    mkdir test.somesite.com\n\n    cd test.somesite.com\n\n    sudo a2host.phar --enable --htdocs=www test.somesite.com\n\nIf the flag htdocs is not set then the default htdocs name is `htdocs`\n\nAfter the host has been enabled you can visit: http://test.somesite.com\n\nDisable:\n\n    cd somesite.com\n\n    sudo a2host.phar --disable somesite.com\n\nThis does not delete any files. It just disables the host. \n\n## https\n\nUsing certbot you can add ssl certificate and enable `https`:\n\n    sudo certbot --apache\n\nInstall certbot: \n\nSee: https://certbot.eff.org/all-instructions\n\n\nLicense: MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fapache2-host-enabler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiversen%2Fapache2-host-enabler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fapache2-host-enabler/lists"}