mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
tabify
This commit is contained in:
parent
906c589f14
commit
a0719e4b86
@ -8,21 +8,41 @@ If you're using a small VPS to host services with very limited memory, consider
|
||||
|
||||
## Installation
|
||||
|
||||
::::{tabs}
|
||||
|
||||
:::{group-tab} Ubuntu 2004, 2204
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS 7
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS Stream 8
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS Stream 9
|
||||
|
||||
:::
|
||||
::::
|
||||
Ubuntu 1804, 2004:
|
||||
|
||||
```shell
|
||||
apt-get install apache2
|
||||
```
|
||||
|
||||
CentOS 7:
|
||||
|
||||
```shell
|
||||
yum install httpd
|
||||
```
|
||||
|
||||
Centos Stream 8, Stream 9
|
||||
|
||||
```shell
|
||||
dnf install httpd
|
||||
```
|
||||
|
||||
CentOS 7, Stream 8, Stream 9
|
||||
|
||||
```shell
|
||||
systemctl enable httpd
|
||||
```
|
||||
@ -30,25 +50,54 @@ systemctl enable httpd
|
||||
```shell
|
||||
systemctl start httpd
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Permissions
|
||||
|
||||
Apache needs to be able to read the folder containing your auth project's static files.
|
||||
Ubuntu 1804, 2004:
|
||||
```
|
||||
|
||||
::::{tabs}
|
||||
:::{group-tab} Ubuntu 2004, 2204
|
||||
|
||||
```shell
|
||||
chown -R www-data:www-data /var/www/myauth/static
|
||||
```
|
||||
CentOS 7, Stream 8, Stream 9
|
||||
```
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS 7
|
||||
|
||||
```shell
|
||||
chown -R apache:apache /var/www/myauth/static
|
||||
```
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS Stream 8
|
||||
|
||||
```shell
|
||||
chown -R apache:apache /var/www/myauth/static
|
||||
```
|
||||
|
||||
:::
|
||||
:::{group-tab} CentOS Stream 9
|
||||
|
||||
```shell
|
||||
chown -R apache:apache /var/www/myauth/static
|
||||
```
|
||||
|
||||
:::
|
||||
::::
|
||||
|
||||
### Further Configuration
|
||||
|
||||
Apache serves sites through defined virtual hosts. These are located in `/etc/apache2/sites-available/` on Ubuntu and `/etc/httpd/conf.d/httpd.conf` on CentOS.
|
||||
|
||||
A virtual host for auth need only proxy requests to your WSGI server (Gunicorn if you followed the install guide) and serve static files. Examples can be found below. Create your config in its own file e.g. `myauth.conf`
|
||||
|
||||
### Ubuntu
|
||||
|
||||
::::{tabs}
|
||||
:::{group-tab} Ubuntu 2004, 2204
|
||||
To proxy and modify headers a few mods need to be enabled.
|
||||
|
||||
```shell
|
||||
a2enmod proxy
|
||||
a2enmod proxy_http
|
||||
@ -56,20 +105,32 @@ a2enmod headers
|
||||
```
|
||||
|
||||
Create a new config file for auth e.g. `/etc/apache2/sites-available/myauth.conf` and fill out the virtual host configuration. To enable your config use `a2ensite myauth.conf` and then reload apache with `service apache2 reload`.
|
||||
:::
|
||||
:::{group-tab} CentOS 7
|
||||
Place your virtual host configuration in the appropriate section within `/etc/httpd/conf.d/httpd.conf` and restart the httpd service with `systemctl restart httpd`.
|
||||
:::
|
||||
:::{group-tab} CentOS Stream 8
|
||||
Place your virtual host configuration in the appropriate section within `/etc/httpd/conf.d/httpd.conf` and restart the httpd service with `systemctl restart httpd`.
|
||||
:::
|
||||
:::{group-tab} CentOS Stream 9
|
||||
Place your virtual host configuration in the appropriate section within `/etc/httpd/conf.d/httpd.conf` and restart the httpd service with `systemctl restart httpd`.
|
||||
:::
|
||||
::::
|
||||
|
||||
```{eval-rst}
|
||||
.. warning::
|
||||
In some scenarios, the Apache default page is still enabled. To disable it use::
|
||||
:::{warning}
|
||||
In some scenarios, the Apache default page is still enabled. To disable it use
|
||||
|
||||
```shell
|
||||
a2dissite 000-default.conf
|
||||
```
|
||||
|
||||
### CentOS
|
||||
:::
|
||||
|
||||
Place your virtual host configuration in the appropriate section within `/etc/httpd/conf.d/httpd.conf` and restart the httpd service with `systemctl restart httpd`.
|
||||
### CentOS
|
||||
|
||||
## Sample Config File
|
||||
|
||||
```
|
||||
```conf
|
||||
<VirtualHost *:80>
|
||||
ServerName auth.example.com
|
||||
|
||||
@ -107,7 +168,7 @@ It's 2018 - there's no reason to run a site without SSL. The EFF provides free,
|
||||
|
||||
After acquiring SSL the config file needs to be adjusted. Add the following lines inside the `<VirtualHost>` block:
|
||||
|
||||
```
|
||||
```conf
|
||||
RequestHeader set X-FORWARDED-PROTOCOL https
|
||||
RequestHeader set X-FORWARDED-SSL On
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user