mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-12-18 23:05:07 +01:00
find and replace fixes, will introduce errors
This commit is contained in:
@@ -14,7 +14,7 @@ If you're converting from Apache, here are some things to consider.
|
||||
|
||||
Nginx is lightweight for a reason. It doesn't try to do everything internally and instead concentrates on just being a good HTTP server. This means that, unlike Apache, it won't automatically run PHP scripts via mod_php and doesn't have an internal WSGI server like mod_wsgi. That doesn't mean that it can't, just that it relies on external processes to run these instead. This might be good or bad depending on your outlook. It's good because it allows you to segment your applications, restarting Alliance Auth wont impact your PHP applications. On the other hand it means more config and more management of services. For some people it will be worth it, for others losing the centralised nature of Apache may not be worth it.
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
+-----------+----------------------------------------+
|
||||
| Apache | Nginx Replacement |
|
||||
+===========+========================================+
|
||||
@@ -33,7 +33,7 @@ Install Nginx via your preferred package manager or other method. If you need he
|
||||
|
||||
Nginx needs to be able to read the folder containing your auth project's static files. `chown -R nginx:nginx /var/www/myauth/static`.
|
||||
|
||||
```eval_rst
|
||||
```{eval-rst}
|
||||
.. tip::
|
||||
Some specific distros may use ``www-data:www-data`` instead of ``nginx:nginx``, causing static files (images, stylesheets etc) not to appear. You can confirm what user Nginx will run under by checking either its base config file ``/etc/nginx/nginx.conf`` for the "user" setting, or once Nginx has started ``ps aux | grep nginx``.
|
||||
Adjust your chown commands to the correct user if needed.
|
||||
@@ -45,24 +45,24 @@ You will need to have [Gunicorn](gunicorn.md) or some other WSGI server setup fo
|
||||
## Install
|
||||
|
||||
Ubuntu 1804, 2004, 2204:
|
||||
```bash
|
||||
```shell
|
||||
sudo apt-get install nginx
|
||||
```
|
||||
|
||||
CentOS 7
|
||||
```bash
|
||||
```shell
|
||||
sudo yum install nginx
|
||||
```
|
||||
|
||||
CentOS Stream 8, Stream 9:
|
||||
```bash
|
||||
```shell
|
||||
sudo dnf install nginx
|
||||
```
|
||||
|
||||
Create a config file in `/etc/nginx/sites-available` (`/etc/nginx/conf.d` on CentOS) and call it `alliance-auth.conf` or whatever your preferred name is.
|
||||
|
||||
Create a symbolic link to enable the site (not needed on CentOS):
|
||||
```bash
|
||||
```shell
|
||||
ln -s /etc/nginx/sites-available/alliance-auth.conf /etc/nginx/sites-enabled/
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user