"Original" RabbitMQ HTTP server Plugin

Source: Internet
Author: User
Tags hosting rabbitmq


HTTP Server Plugin
HTTP Server plug-in

The Rabbitmq-mochiweb Plugin provides hosting for other plugins that has HTTP interfaces. It allows these interfaces to co-exist in one or more HTTP listeners.
Rabbitmq-mochiweb Plug-ins can provide hosting functionality for other HTTP interfaces to plug-ins. Allow these interfaces to coexist with one or more HTTP listener.

Configuration
How to configure

Plugins using rabbit Mq-mochiweb typically take a listener configuration item to configure their listening HTTP port. In this page we'll give examples for the rabbitmq_management application, but the same configuration can is applied to r Abbitmq_jsonrpc and Rabbitmq_web_stomp_examples.
with Rabbitmq-mochiweb plug-ins, a typical configuration is to configure an HTTP listening port through a listener configuration entry. Here, we will use the Rabbitmq_management application as an example to illustrate, the same configuration can be applied to RABBITMQ_JSONRPC and Rabbitmq_web_stomp to the example.

The listener configuration item can contain the following keys:
The Listener configuration entry can contain the following key values:
    • Port (mandatory)
    • IP (to listen on only one interface)
    • SSL (to enable SSL)
    • ssl_opts (To configure SSL)


Listening on a single interface
only listen on a single interface

Use IP to specify an interface for Mochiweb to bind to (giving an IP address as a string or tuple). For example:
You can use IP to specify the interface to which Mochiweb is bound (the IP address is given as a string or tuple), for example:
[{rabbitmq_management,  [{listener, [{port, 15672},               {IP, ' 127.0.0.1 '} '}]  }].

SSL

Set SSL to True to turn on SSL for a listener. Use the ssl_opts to specify SSL options. These is the standard Erlang SSL Options-see the main page of SSL for more information.
set SSL to True to set a listener to support SSL. The SSL option can be specified with ssl_opts. These options are standard Erlang SSL options-See the man page for SSL.

for convenience, if specify ssl_opts then Rabbitmq-mochiweb would use the same options as the main RABBITMQ Server does for AMQP-over-SSL, but with client certificate verification turned off. If you wish to use client certificate verification, specify ssl_opts explicitly.
in simple use, if you do not set ssl_opts, then Rabbitmq-mochiweb will use the same option as the RABBITMQ server for AMQP over SSL, but the client certificate validation mechanism is turned off. If you want to use the client certificate validation mechanism, you can explicitly set the ssl_opts content.

For Example:
[{rabbitmq_management,  [{listener, [{port,     15672},               {SSL,      true},               {ssl_opts, [{cacertfile, '/ Path/to/cacert.pem "},                           {certfile,   "/path/to/cert.pem "},                           {keyfile,    "/path/to/key.pem "}]}              ] }  ]}].








"Original" RabbitMQ HTTP server Plugin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.