I though it would be good to have it at the bottom of the page, but it doesn't look too good there too. Also some tabs were wrong and on mobile the lines were too long, went outside the box Improved here. Menel
-- You received this message because you are subscribed to the Google Groups "prosody-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to prosody-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/prosody-dev/EE895C7C-4E37-4BED-9B9B-72F55058A614%40mailbox.org.
# HG changeset patch # User Menel <me...@mailbox.de> # Date 1720816895 -7200 # Fri Jul 12 22:41:35 2024 +0200 # Node ID c80367e6dc0a582cbaa2bd853d94aeecce2bb3d0 # Parent 77aba793eccbe7dae9adb8cfb978511a094e0376 Correct format for TABS and move the Apache section up again. diff -r 77aba793eccb -r c80367e6dc0a doc/http.md --- a/doc/http.md Thu Jun 13 18:30:08 2024 +0200 +++ b/doc/http.md Fri Jul 12 22:41:35 2024 +0200 @@ -304,18 +304,6 @@ ) ``` -# Adding HTTP-only hosts {#adding_http-only_hosts} - -You can also make a HTTP-only host via a dummy component: - -``` {.code .lua} - Component "www.example.com" "http" - modules_enabled = { "bosh" } -``` - -HTTP modules such as mod\_bosh must be loaded explicitly here as global -modules are not loaded onto components by default. - ### Apache2 full example See @@ -338,12 +326,13 @@ <VirtualHost *:443> ServerName www.example.com SSLEngine On - SSLCertificateFile /path/to/certificatefolder/fullchain.pem - SSLCertificateKeyFile /path/to/certificatefolder/privkey.pem - #set RequestHeader to your prosody http_host, necessary if it is different from the ServerName. + SSLCertificateFile /path/to/certificatefolder/fullchain.pem + SSLCertificateKeyFile /path/to/certificatefolder/privkey.pem +# set RequestHeader to your prosody http_host. +# Its necessary if it is different from the ServerName like in this example: RequestHeader set Host "example.com" - RequestHeader set X-Forwarded-Proto: https - ProxyPreserveHost On + RequestHeader set X-Forwarded-Proto: https + ProxyPreserveHost On ProxyPass / "http://127.0.0.1:5280/xmpp-websocket" upgrade=websocket timeout=900 @@ -354,12 +343,12 @@ <VirtualHost *:443> ServerName share.example.com SSLEngine On - SSLCertificateFile /path/to/certificatefolder/fullchain.pem - SSLCertificateKeyFile /path/to/certificatefolder/privkey.pem + SSLCertificateFile /path/to/certificatefolder/fullchain.pem + SSLCertificateKeyFile /path/to/certificatefolder/privkey.pem - ProxyPreserveHost On - RequestHeader set X-Forwarded-Proto: https - #here the RequestHederHost is already the same as the Component name. + ProxyPreserveHost On + RequestHeader set X-Forwarded-Proto: https +#here the RequestHederHost is already the same as the Component name. ProxyPreserveHost On ProxyPass / "http://127.0.0.1:5280/" ProxyPassReverse / "http://127.0.0.1:5280/" @@ -372,15 +361,31 @@ ``` {.code .lua} VirtualHost "example.com" ---... optional unrelated settings ... +-- ... optional unrelated settings ... Component "share.example.com" "http_file_share" - modules_disabled = { "s2s"; } -- its not nessesary to have it loaded here - http_file_share_size_limit = 1024*1024*100 --100MB - http_file_share_expires_after = "2 weeks" - http_external_url = "https://share.example.com/" --nessesary to be the same as the apache host - http_paths = { - file_share = "/"; -- From the base URL - } --here you see how we can manipulate the path for every module like this. +-- its not nessesary to have s2s loaded here: + modules_disabled = { "s2s"; } +-- Change the Limit to 100MB: + http_file_share_size_limit = 1024*1024*100 + http_file_share_expires_after = "2 weeks" +-- Set it to the same as the apache host above: + http_external_url = "https://share.example.com/" + -- here you see how we can manipulate the path: + http_paths = { + file_share = "/"; --Serve from the base URL + } ``` + +# Adding HTTP-only hosts {#adding_http-only_hosts} + +You can also make a HTTP-only host via a dummy component: + +``` {.code .lua} + Component "www.example.com" "http" + modules_enabled = { "bosh" } +``` + +HTTP modules such as mod\_bosh must be loaded explicitly here as global +modules are not loaded onto components by default.