29 lines
1.2 KiB
Markdown
29 lines
1.2 KiB
Markdown
## Nginx configuration examples
|
|
|
|
### Prerequisites
|
|
An Ubuntu 22.04 server with Nginx and Php-Fpm 8.1\
|
|
Nginx with Php-Fpm 8.1 can be installed from
|
|
[\[Here\]](https://git.x-files.dk/ubuntu-server-apps/nginx-install)
|
|
|
|
> **IMPORTANT**
|
|
> These configuration examples relay on some specific Nginx configuration settings I created.\
|
|
> This means the directory nginxsnippets I created should be present in the directory \/etc\/nginx
|
|
|
|
### This can be accomplished like this
|
|
```
|
|
git clone https://git.x-files.dk/ubuntu-server-files/nginxsnippets.git /etc/nginx/nginxsnippets
|
|
```
|
|
|
|
The main nginx.conf is supposed to look something like the one I use [\[Here\]](https://git.x-files.dk/ubuntu-server-apps/nginx-install/src/branch/main/cfg/nginx.conf).
|
|
And the sites-enabled is supposed to look something like this one [\[Here\]](https://git.x-files.dk/ubuntu-server-apps/nginx-install/src/branch/main/cfg/default).
|
|
Once you have this sorted out the configuration examples should make sence.
|
|
|
|
### Benefeits
|
|
Setting up Nginx like this makes a lot of sense since you will end up with a much cleaner code when creating configurations for your sites.
|
|
|
|
### More guides
|
|
More guides can be found on [\[wiki.xfiles.dk\]](https://wiki.x-files.dk)
|
|
|
|
### Last tested
|
|
January 12th 2024 on Ubuntu 22.04.
|