summaryrefslogtreecommitdiff
path: root/docs/getting_started
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2024-02-12 12:05:35 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-12 11:05:35 +0000
commit4a4017b0424ed4042a48f453b964ee10b0541ba9 (patch)
tree05555f0494b4e4f7f9955a9287126c4ccba518d1 /docs/getting_started
parentMake GtS reported version SemVer-compatible (#2611) (diff)
downloadgotosocial-4a4017b0424ed4042a48f453b964ee10b0541ba9.tar.xz
[docs] Enable some new features (#2623)
* [docs] Enable a bunch of markdown extensions * details makes admonitions collapsible and when started with ??? instead of !!! they'll be collpased by default * highlights are updated to include linenums by default but with a style that doesn't result in the linenums to be copy-pasted when selecting and pasting. This makes it possible to directly link to a specific line in the documentation instead of just the general page * caret, mark and tilde make it possible to highlight text and have super/subscripts * keys turns combos like `++ctrl+alt+del++` into HTML key elements showing a keyboard combination to press * tabbed makes it possible to have tabs within a document. Right now we have different sections sometimes to show the config for nginx, apache and Caddy, which can be turned into tabs instead and which tab is picked will get remebered * smartsymbols turns certain things, like `(c)` in the right symbol © * [docs] Upgrade all the python dependencies * [docs] Explain how to update conda deps
Diffstat (limited to 'docs/getting_started')
-rw-r--r--docs/getting_started/reverse_proxy/apache-httpd.md145
1 files changed, 79 insertions, 66 deletions
diff --git a/docs/getting_started/reverse_proxy/apache-httpd.md b/docs/getting_started/reverse_proxy/apache-httpd.md
index 29af32734..e30d98615 100644
--- a/docs/getting_started/reverse_proxy/apache-httpd.md
+++ b/docs/getting_started/reverse_proxy/apache-httpd.md
@@ -64,55 +64,55 @@ In the above `sudoedit` command, replace `example.com` with the hostname of your
The file you're about to create should look a bit like this:
-```apache
-MDomain example.com auto
-MDCertificateAgreement accepted
-
-<VirtualHost *:80 >
- ServerName example.com
-</VirtualHost>
-
-<VirtualHost *:443>
- ServerName example.com
-
- RewriteEngine On
- RewriteCond %{HTTP:Upgrade} websocket [NC]
- RewriteCond %{HTTP:Connection} upgrade [NC]
- # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
- RewriteRule ^/?(.*) "ws://127.0.0.1:8080/$1" [P,L]
-
- SSLEngine On
- ProxyPreserveHost On
- # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
- ProxyPass / http://127.0.0.1:8080/
- ProxyPassReverse / http://127.0.0.1:8080/
-
- RequestHeader set "X-Forwarded-Proto" expr=https
-</VirtualHost>
-```
-
-or, if you have [Apache httpd 2.4.47+](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#protoupgrade), you can get rid of both `mod_rewrite` and `mod_proxy_wstunnel` and simplify the whole config to:
-
-```apache
-MDomain example.com auto
-MDCertificateAgreement accepted
-
-<VirtualHost *:80 >
- ServerName example.com
-</VirtualHost>
-
-<VirtualHost *:443>
- ServerName example.com
-
- SSLEngine On
- ProxyPreserveHost On
- # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
- ProxyPass / http://127.0.0.1:8080/ upgrade=websocket
- ProxyPassReverse / http://127.0.0.1:8080/
-
- RequestHeader set "X-Forwarded-Proto" expr=https
-</VirtualHost>
-```
+=== "2.4.47+"
+ ```apache
+ MDomain example.com auto
+ MDCertificateAgreement accepted
+
+ <VirtualHost *:80 >
+ ServerName example.com
+ </VirtualHost>
+
+ <VirtualHost *:443>
+ ServerName example.com
+
+ SSLEngine On
+ ProxyPreserveHost On
+ # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
+ ProxyPass / http://127.0.0.1:8080/ upgrade=websocket
+ ProxyPassReverse / http://127.0.0.1:8080/
+
+ RequestHeader set "X-Forwarded-Proto" expr=https
+ </VirtualHost>
+ ```
+
+=== "older versions"
+ ```apache
+ MDomain example.com auto
+ MDCertificateAgreement accepted
+
+ <VirtualHost *:80 >
+ ServerName example.com
+ </VirtualHost>
+
+ <VirtualHost *:443>
+ ServerName example.com
+
+ RewriteEngine On
+ RewriteCond %{HTTP:Upgrade} websocket [NC]
+ RewriteCond %{HTTP:Connection} upgrade [NC]
+ # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
+ RewriteRule ^/?(.*) "ws://127.0.0.1:8080/$1" [P,L]
+
+ SSLEngine On
+ ProxyPreserveHost On
+ # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
+ ProxyPass / http://127.0.0.1:8080/
+ ProxyPassReverse / http://127.0.0.1:8080/
+
+ RequestHeader set "X-Forwarded-Proto" expr=https
+ </VirtualHost>
+ ```
Again, replace occurrences of `example.com` in the above config file with the hostname of your GtS server. If your domain name is `gotosocial.example.com`, then `gotosocial.example.com` would be the correct value.
@@ -182,23 +182,36 @@ In the above `sudoedit` command, replace `example.com` with the hostname of your
The file you're about to create should look initially for both 80 (required) and 443 ports (optional) a bit like this:
-```apache
-<VirtualHost *:80>
- ServerName example.com
-
- RewriteEngine On
- RewriteCond %{HTTP:Upgrade} websocket [NC]
- RewriteCond %{HTTP:Connection} upgrade [NC]
- # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
- RewriteRule ^/?(.*) "ws://127.0.0.1:8080/$1" [P,L]
-
- ProxyPreserveHost On
- # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
- ProxyPass / http://127.0.0.1:8080/
- ProxyPassReverse / http://127.0.0.1:8080/
-
-</VirtualHost>
-```
+=== "2.4.47+"
+ ```apache
+ <VirtualHost *:80>
+ ServerName example.com
+
+ ProxyPreserveHost On
+ # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
+ ProxyPass / http://127.0.0.1:8080/ upgrade=websocket
+ ProxyPassReverse / http://127.0.0.1:8080/
+ </VirtualHost>
+ ```
+
+=== "older versions"
+ ```apache
+ <VirtualHost *:80>
+ ServerName example.com
+
+ RewriteEngine On
+ RewriteCond %{HTTP:Upgrade} websocket [NC]
+ RewriteCond %{HTTP:Connection} upgrade [NC]
+ # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
+ RewriteRule ^/?(.*) "ws://127.0.0.1:8080/$1" [P,L]
+
+ ProxyPreserveHost On
+ # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
+ ProxyPass / http://127.0.0.1:8080/
+ ProxyPassReverse / http://127.0.0.1:8080/
+
+ </VirtualHost>
+ ```
Again, replace occurrences of `example.com` in the above config file with the hostname of your GtS server. If your domain name is `gotosocial.example.com`, then `gotosocial.example.com` would be the correct value.