[docs] Change Apache SSL setup to automatic and manual mode (#936)

* Update apache-httpd.md

* Update apache-httpd.md

* Update apache-httpd.md
This commit is contained in:
EchedeyLR 2022-10-31 13:14:02 +00:00 committed by GitHub
parent ea90d12169
commit 47de702506
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ sudo systemctl restart gotosocial.service
Or if you don't have a systemd service just restart it manually. Or if you don't have a systemd service just restart it manually.
## Set up Apache HTTP Server with LetsEncrypt SSL ## Set up Apache HTTP Server with SSL managed using MD module
Now we'll configure Apache HTTP Server to serve GoToSocial requests. Now we'll configure Apache HTTP Server to serve GoToSocial requests.
@ -132,9 +132,9 @@ If this happens, you'll need to do one (or all) of the below:
1. Update `/etc/apache2/sites-enabled/000-default.conf` and change the `ServerAdmin` value to a valid email address (then reload Apache HTTP Server). 1. Update `/etc/apache2/sites-enabled/000-default.conf` and change the `ServerAdmin` value to a valid email address (then reload Apache HTTP Server).
2. Add the line `MDContactEmail your.email.address@whatever.com` below the `MDomain` line in `/etc/apache2/sites-available/example.com.conf`, replacing `your.email.address@whatever.com` with a valid email address, and `example.com` with your GtS host name. 2. Add the line `MDContactEmail your.email.address@whatever.com` below the `MDomain` line in `/etc/apache2/sites-available/example.com.conf`, replacing `your.email.address@whatever.com` with a valid email address, and `example.com` with your GtS host name.
## Set up Apache HTTP Server **without** LetsEncrypt SSL ## Set up Apache HTTP Server with SSL managed manually or by an external software (e.g. Certbot or acme.sh)
If you prefer to use a different service to manage SSL certificates (Certbot etc), then you can use a simpler setup for your Apache HTTP Server. If you prefer to have a manual setup or setting SSL using a different service to manage it (Certbot, etc), then you can use a simpler setup for your Apache HTTP Server.
First we'll write a configuration for Apache HTTP Server and put it in `/etc/apache2/sites-available`: First we'll write a configuration for Apache HTTP Server and put it in `/etc/apache2/sites-available`:
@ -145,7 +145,7 @@ sudoedit /etc/apache2/sites-available/example.com.conf
In the above `sudoedit` command, replace `example.com` with the hostname of your GoToSocial server. In the above `sudoedit` command, replace `example.com` with the hostname of your GoToSocial server.
The file you're about to create should look a bit like this: The file you're about to create should look initially for both 80 (required) and 443 ports (optional) a bit like this:
```apache ```apache
<VirtualHost *:80> <VirtualHost *:80>
@ -157,6 +157,8 @@ The file you're about to create should look a bit like this:
</VirtualHost> </VirtualHost>
``` ```
In the case of providing an initial setup for the 443 port looking for additional managing by an external tool, you could use default certificates provided by the server which you can find referenced in the `default-ssl.conf` file at `/etc/apache2/sites-available/`.
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. 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.
You should also change `http://localhost:8080` to the correct address and port of your GtS server. For example, if you're running GoToSocial on another machine with the local ip of `192.168.178.69` and on port `8080` then `http://192.168.178.69:8080/` would be the correct value. You should also change `http://localhost:8080` to the correct address and port of your GtS server. For example, if you're running GoToSocial on another machine with the local ip of `192.168.178.69` and on port `8080` then `http://192.168.178.69:8080/` would be the correct value.