{"id":19251210,"url":"https://github.com/rexops/rex-apache","last_synced_at":"2026-06-23T10:31:46.799Z","repository":{"id":21471269,"uuid":"24789796","full_name":"RexOps/rex-apache","owner":"RexOps","description":"Example Apache module","archived":false,"fork":false,"pushed_at":"2014-10-04T13:21:03.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-23T16:48:39.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","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/RexOps.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}},"created_at":"2014-10-04T13:09:30.000Z","updated_at":"2015-09-25T23:43:50.000Z","dependencies_parsed_at":"2022-08-21T00:40:15.819Z","dependency_job_id":null,"html_url":"https://github.com/RexOps/rex-apache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RexOps/rex-apache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-apache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-apache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-apache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-apache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RexOps","download_url":"https://codeload.github.com/RexOps/rex-apache/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-apache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34686725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-09T18:21:04.810Z","updated_at":"2026-06-23T10:31:46.782Z","avatar_url":"https://github.com/RexOps.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Apache Module\n\nThis is an example Apache module for Rex.\n\nThis module consist of 1 task (*setup*) and 2 resources (*vhost* and *module*). This module works with CentOS 7.\n\n## TASKS\n\n* setup\n\nWith this task you can setup the apache webserver and configure it.\n\n```perl\nuse Rex -feature =\u003e ['0.54'];\n\nuse Apache;\n\ngroup frontends =\u003e \"fe[01..10]\";\n\ntask \"setup\", sub {\n  Apache::setup;\n};\n```\n\nThe *setup* task has some parameters you can define:\n\n* package - the package name to install\n* service - the service name to use\n* listen - on which port the apache server should listen on\n* user - the user for the daemon\n* group - the group for the daemon\n* server_admin - the ServerAdmin configuration option\n* document_root - the base DocumentRoot configuration option\n* error_log - the error.log file\n* log_level - the log level\n* cgi_bin - the path to your cgi scripts\n* default_charset - the default charset Apache should use\n* httpd_conf_template - if you want to use a custom template\n\n```perl\ntask \"setup\", sub {\n  Apache::setup {\n    listen        =\u003e 8080,\n    document_root =\u003e \"/srv/www/htdocs\",\n  };\n};\n```\n\n## RESOURCES\n\n* module\n\nWith this resource you can manage which module the Apache webserver should load.\n\n```perl\ntask \"setup\", sub {\n  Apache::setup;\n\n  Apache::module \"rewrite\",\n    ensure =\u003e \"present\";\n};\n```\n\nIf you need to define the load order, you can also set the *order* parameter.\n\n```perl\ntask \"setup\", sub {\n  Apache::setup;\n\n  Apache::module \"rewrite\",\n    order  =\u003e '04',\n    ensure =\u003e \"present\";\n};\n```\n\n* vhost\n\nWith this resource you can manage the virtual hosts.\n\n```perl\ntask \"setup\", sub {\n  Apache::setup;\n\n  Apache::vhost \"www.somedomain.tld\",\n    ensure =\u003e \"present\";\n};\n```\n\nThere are several options you can define here:\n\n* order - the load order\n* ip - the ip to use. default: *\n* server_admin - the ServerAdmin configuration option\n* document_root - the DocumentRoot for this virtual host\n* error_log - the error.log file for this virtual host\n* access_log - the access.log file for this virtual host\n* access_log_format - the log format for this virtual host\n* template - if you want to use a custom tempate\n\n```perl\ntask \"setup\", sub {\n  Apache::setup;\n\n  Apache::vhost \"www.somedomain.tld\",\n    order  =\u003e '01',\n    ip     =\u003e '127.0.0.1',\n    ensure =\u003e \"present\";\n};\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexops%2Frex-apache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexops%2Frex-apache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexops%2Frex-apache/lists"}