{"id":17470903,"url":"https://github.com/matsumotory/mod_mruby_reverse_proxy","last_synced_at":"2026-01-04T20:41:40.877Z","repository":{"id":7980006,"uuid":"9383177","full_name":"matsumotory/mod_mruby_reverse_proxy","owner":"matsumotory","description":"Reverse Proxy by mod_mruby","archived":false,"fork":false,"pushed_at":"2013-04-12T10:41:23.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T05:26:37.131Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/matsumotory.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":"2013-04-12T00:26:28.000Z","updated_at":"2013-10-14T23:29:41.000Z","dependencies_parsed_at":"2022-08-29T08:11:00.510Z","dependency_job_id":null,"html_url":"https://github.com/matsumotory/mod_mruby_reverse_proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_mruby_reverse_proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_mruby_reverse_proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_mruby_reverse_proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matsumotory%2Fmod_mruby_reverse_proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matsumotory","download_url":"https://codeload.github.com/matsumotory/mod_mruby_reverse_proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245045434,"owners_count":20552037,"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":[],"created_at":"2024-10-18T16:12:13.279Z","updated_at":"2026-01-04T20:41:40.835Z","avatar_url":"https://github.com/matsumotory.png","language":null,"readme":"# Porxy Module by mod_mruby\n\nProxy Module using mod_mruby.\n\n- mrbgem dependency for mod_mruby\n\n    `Nothing`\n\n## How to Use\n- Intall mod_mruby previously\n\n    See https://github.com/matsumoto-r/mod_mruby\n\n- Copy conf\n\n    ```bash\n    cp mod_mruby_proxy.conf ${HTTPD_ROOT}/conf.d/.\n    ```\n\n- Change mod_mruby_proxy.conf for you\n\n    ```apache\n    \u003cIfModule mruby_module\u003e\n      # simple proxy module\n      mrubyTranslateNameFirst /path/to/proxy.rb\n      \n      # proxy modul by scoreboard information\n      #mrubyTranslateNameFirst /path/to/proxy_by_scboard.rb\n    \u003c/IfModule\u003e\n    ```\n\n- Change /path/to/proxy_by_scboard.rb for you\n\n    ```ruby\n    backends = [\n        \"http://192.168.0.101:8888/\",\n        \"http://192.168.0.102:8888/\",\n        \"http://192.168.0.103:8888/\",\n        \"http://192.168.0.104:8888/\",\n    ]\n    \n    # この辺に色々条件を入れたり、backends配列から取り出すルールを別途定義したりするとmod_mrubyのうまみがでる？\n    \n    r = Apache::Request.new\n    \n    r.handler  = \"proxy-server\"\n    r.proxyreq = Apache::PROXYREQ_REVERSE\n    r.filename = \"proxy:\" + backends[rand(backends.length)] + r.uri\n    \n    Apache.return Apache::OK\n    ```\n\n- httpd restart\n\n    ```bash\n    service httpd restart\n    ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fmod_mruby_reverse_proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatsumotory%2Fmod_mruby_reverse_proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatsumotory%2Fmod_mruby_reverse_proxy/lists"}