cfg | ||
cfg-apps | ||
nginxsnippets | ||
LICENSE | ||
nginxinstall | ||
README.md |
Nginx Php-Fpm install script for Ubuntu 22.04 and 24.04 server.
Prerequisites
Ubuntu 22.04 server or higher.
Download the script
git clone https://git.x-files.dk/ubuntu-web-server/nginx-install.git
Usage
cd nginx-install
sudo ./nginxinstall
Nginx configuration contains the following
A directory called nginxsnippets located in /etc/nginx. This directory contains snippets for use with nginx in order to try and have as clean and readable configuration files as possible.
Cloudflare Real IP configuration. I order to see the proxied ip addresses when users are comming from cloudflare.
The default website answering on IP address is disabled and will send a 444 i.e drop the tcp connection this is by my design feal free to change it.
Bad Bots blocking file blocking CSP and SSL settings. Modify as you see fit.
Custom error pages. You can modify them to your needs they are residing in /etc/nginxsnippets/errorpages
Notes
This setup is really doing some heavy lifting due the the enhanced caching that has been configured. If this turns out to be an issue just comment out the lines containing the caching configuration as well as opcache configuration in php.ini.
Post install
Nothing to do.
More guides
More guides can be found on [wiki.x-files.dk]
Last tested
October 19th 2024 on Ubuntu 24.04.