Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 802 Bytes

README.md

File metadata and controls

43 lines (35 loc) · 802 Bytes

http-mruby-info

Show versions of web server and mruby extension using mruby code.

Configuration

Nginx with ngx_mruby

location /info {
  mruby_content_handler /path/to/nginx/conf.d/mruby_info/mruby_info.rb cache;
}
$ curl -s http://localhost/info | jq
{
  "server_name": "NGINX",
  "server_version": "1.11.4",
  "mruby_version": "1.2.0",
  "module_name": "ngx_mruby",
  "module_version": "1.18.3"
}

Apache with mod_mruby

<Location /info>
    mrubyHandlerMiddle /path/to/httpd/conf.d/mruby_info/mruby_info.rb cache
</Location>
$ curl -s http://localhost/info | jq
{
  "server_name": "Apache",
  "server_version": "Apache/2.4.7 (Ubuntu)",
  "mruby_version": "1.2.0",
  "module_name": "mod_mruby",
  "module_version": "1.13.11"
}