Mhttpd: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
mNo edit summary
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4">
The midas documentation has moved. The new documentation about the mhttpd web server is in:
* [[Midas_documentation|Midas Documentation]]
* [https://midas.triumf.ca/docs/develop/reference/reference/programs/#mhttpd mhttpd] on the Programs and options page (command-line options)
* [[Feature_listing|Feature Listing]]
* [https://midas.triumf.ca/docs/develop/features/core_system/web/ Web interface: overview] (connecting and the built-in pages)
* [[Application_listing|Application Listing]]
* [https://midas.triumf.ca/docs/develop/features/deployment/security/#web-security Web security] on the Security page (access from other computers, proxies and SSL)
* [[Online_Database|Online Database]]
</div>
= Links =
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[Status Page]]
* [[Programs Page]]
* [[ODB Page]]
* [[Alarms Page]]
* [[MSCB Page]]
* [[Custom Page]]
* [[Mhttpd.js|MIDAS Javascript Library]]
* [[odbedit]]
* [[Security]]
</div>
 
= Purpose =
The <span style="color:darkcyan;">''mhttpd''</span> utility runs the '''MIDAS Web Server''' which allows the user to communicate with an experiment using any web browser. It is used primarily for run control.
 
= Arguments =
 
    -p port        : port number e.g. 8081 (no default). See [[#Usage|usage]].
    --mg          : listens on port 8443. See [[#Usage|usage]].
  [-h hostname ]  : see [[Common Parameters to MIDAS Utilities]]
  [-e experiment] : see [[Common Parameters to MIDAS Utilities]]
  [-v]            : display verbose HTTP communication
  [-D]            : starts program as a daemon
  [-E]            : only display ELog system
  [-H]            : only display history plots
  [-a hostname]  : only allow access for specific host(s). Several [-a Hostname] statements might be given
  [-help]        : display usage information
 
= Usage =
If Web [[Security]] is an issue, use the command
: mhttpd --mg   
to start the web server.  See [[#HTTPS/SSL server (mongoose)|mhttpd HTTPS/SSL server]] for more information.
 
 
If Web Security is not a concern, or if running behind a firewall, the command '''mhttpd -p port''' can be used to start the web server (http version). In this case, the TCP/IP port number is '''required''' as an argument in order to listen to the web-based request.
<br>e.g. if mhttpd is started on IP host machine "myhost" on port 8081 as follows
: mhttpd -p 8081 -D
access to the [[#Features|''Midas status page'']] can be obtained by pointing a web browser to
http://myhost.mydomain:8081
 
;Note
If [[Exptab|multiple experiments]] run on the same host, a web server for each experiment must be started on a different port, e.g.
          mhttpd -e expt1 -p 8081 -D
          mhttpd -e expt2 -p 8082 -D
 
 
 
 
= Features =
[[Mhttpd]] provides a means for run control including monitoring of the run parameters.
Its main feature is a web page invoked through any web browser accessing the Midas experimental URL at a defined port (see [[#Usage|Usage]]). 
 
 
 
The contents of this '''Midas status page''' is composed with minimal information relative to the experiment. It contains a collection of buttons and links to other pages to further describe and control the configuration of the experiment.
 
* Minimal display on the main [[Status Page]]
** Experiment name, time & date, page refresh rate
** Standard Menu Buttons (see below)
** User defined buttons (e.g. alias links, run scripts, custom pages etc.)
** run comments and condition display section (if enabled)
** Equipment list with current running condition, number of event received, event rate, data rate for each equipment.
** Data logging statistics (number of event recorded, data size recorder, compression factor, usage storage level) if enabled.
** Secondary Data logging (data mover) with statistics if enabled.
** Single line of the most recent Midas message.
** Table of the current applications connected to this experiment.
 
* Standard Menu Buttons
** Transition the state of the run (stopped/running/paused), allows user running condition parameters to be entered at the start state (see [[Edit-on-start Parameters]]).
** Access to the full [[Online Database]] for data display and/or data content modification.
** Display the [[Message Page]], which shows messages generated by the MIDAS [Message System]] as well as the user using cm_msg() functions.
** Access to [[ELOG Page]] switches to the predefined "electronic logbook".
** Access to the [[Alarms Page]] for monitoring the different type of alarms (evaluated, programs, internals, periodic).
** Access to the [[Programs Page]]  for a status or interaction with the current running applications part of the Midas experiment.
** Access to the [[History Page]] for graphical data representation of any ODB variables and acquired data.
** Access to the Midas Slow Control Bus devices [[MSCB Page]] connected to this experiment.
** Access to the [[Sequencer Page]] control/monitoring page for [[Sequencer]] i.e. interactive loading/saving/running of a run sequence based on any ODB parameters.
** Access to the [[Help Page]] with short-cut to the Midas Help documentation resource and other information.
* Links
** links to all the listed equipments invoking a dedicated page for the display and possible control of the equipment parameters.
** link to the logger configuration (if present) for the data recording.
** link to the possible secondary logging configuration parameters (if present).
 
Other features include a JSON interface and Javascript library used for implementing interactive [[Custom Page|custom pages]] for MIDAS experiments.
 
 
= HTTPS/SSL server (mongoose) =
 
The HTTPS/SSL server is activated using "mhttpd --mg" (instead of -p) and it listens on port 8443.
 
The example SSL certificate provided in midas git is self-signed, for instructions on generating your own
signed certificate, remove it and run "mhttpd --mg" - it will print the correct instructions.
 
 
Documentation for the version of mongoose included with MIDAS can be found at [http://ladd00.triumf.ca/~daqweb/doc/midas-devel/doc/mongoose/ Mongoose documentation].
 
For more information see [https://midas.triumf.ca/elog/Midas/1062 Elog note 1062]
 
[[Category:Utilities]]
[[Category:Web server mhttpd]]

Latest revision as of 22:01, 30 October 2026

The midas documentation has moved. The new documentation about the mhttpd web server is in: