/Webserver ODB tree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Pagelinks}}
The midas documentation has moved. See [https://midas.triumf.ca/docs/develop/reference/reference/odb_keys/#webserver /WebServer] on the ODB keys page and [https://midas.triumf.ca/docs/develop/features/deployment/security/#web-security Web security] on the Security page for the new documentation about the /WebServer ODB keys.
 
= Links =
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* [[odbedit]]
* [[/Experiment ODB tree]]
*
</div>
 
== Creating the <span style="color: purple;">''/Webserver''</span>  tree ==
The <span style="color: purple;">''/Webserver''</span> ODB tree is created automatically when the '''[[mhttpd]]''' program is first run.
 
== Purpose ==
The <span style="color: purple;">''/Webserver''</span> ODB tree configures the behaviour and security features of [[mhttpd]].
 
 
== Examples ==
When initially created, the <span style="color: purple;">''/Webserver''</span> tree contains the following keys:
 
[local:dev_expt:S]/WebServer>ls -lrt
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
WebServer                      DIR
    Enable localhost port      BOOL    1    4    12m  0  RWD  y
    localhost port              INT    1    4    12m  0  RWD  8080
    localhost port passwords    BOOL    1    4    12m  0  RWD  n
    Enable insecure port        BOOL    1    4    12m  0  RWD  n
    insecure port              INT    1    4    12m  0  RWD  8081
    insecure port passwords    BOOL    1    4    12m  0  RWD  y
    insecure port host list    BOOL    1    4    12m  0  RWD  y
    Enable https port          BOOL    1    4    12m  0  RWD  n
    https port                  INT    1    4    12m  0  RWD  8443
    https port passwords        BOOL    1    4    12m  0  RWD  y
    https port host list        BOOL    1    4    12m  0  RWD  n
    Host list                  STRING  10    32    12m  0  RWD
                                        [0]            localhost
                                        [1]
                                        [2]
                                        [3]
                                        [4]
                                        [5]
                                        [6]
                                        [7]
                                        [8]
                                        [9]
    Enable IPv6                BOOL    1    4    12m  0  RWD  y
    Proxy                      DIR
        example                STRING  1    23    12m  0  RWD  #http://localhost:8080
    mime.types                  DIR
        .HTML                  STRING  1    10    12m  0  RWD  text/html
        .HTM                    STRING  1    10    12m  0  RWD  text/html
        .CSS                    STRING  1    9    12m  0  RWD  text/css
        .TXT                    STRING  1    11    12m  0  RWD  text/plain
        .ASC                    STRING  1    11    12m  0  RWD  text/plain
        .ICO                    STRING  1    13    12m  0  RWD  image/x-icon
        .GIF                    STRING  1    10    12m  0  RWD  image/gif
        .JPG                    STRING  1    11    12m  0  RWD  image/jpeg
        .JPEG                  STRING  1    11    12m  0  RWD  image/jpeg
        .PNG                    STRING  1    10    12m  0  RWD  image/png
        .SVG                    STRING  1    14    12m  0  RWD  image/svg+xml
        .BMP                    STRING  1    10    12m  0  RWD  image/bmp
        .MP3                    STRING  1    11    12m  0  RWD  audio/mpeg
        .OGG                    STRING  1    10    12m  0  RWD  audio/ogg
        .MID                    STRING  1    11    12m  0  RWD  audio/midi
        .WAV                    STRING  1    10    12m  0  RWD  audio/wav
        .XML                    STRING  1    16    12m  0  RWD  application/xml
        .JS                    STRING  1    23    12m  0  RWD  application/javascript
        .JSON                  STRING  1    17    12m  0  RWD  application/json
        .PS                    STRING  1    23    12m  0  RWD  application/postscript
        .EPS                    STRING  1    23    12m  0  RWD  application/postscript
        .PDF                    STRING  1    16    12m  0  RWD  application/pdf
        .ZIP                    STRING  1    16    12m  0  RWD  application/zip
        .XLS                    STRING  1    22    12m  0  RWD  application/x-msexcel
        .DOC                    STRING  1    19    12m  0  RWD  application/msword
 
== Keys in <span style="color: purple;">''/Webserver''</span> tree==
 
=== <span style="color: purple;">''Enable localhost port ''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:''' y
</div>
This key in the [[#top|/Webserver tree]] tells mhttpd whether to bind to a port on localhost. The port to bind to is specified by the ''[[#Localhost port|Localhost port]]'' key.
 
=== <span style="color: purple;">''Localhost port ''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:''' 8080
</div>
This key in the [[#top|/Webserver tree]] tells mhttpd which port to bind to on localhost (if ''[[#Enable localhost port|Enable localhost port]]'' is true). If there are multiple experiments running on the same machine, each experiment should specify a different port.

Latest revision as of 22:00, 30 October 2026

The midas documentation has moved. See /WebServer on the ODB keys page and Web security on the Security page for the new documentation about the /WebServer ODB keys.