Files
nginx-ubuntu/README.md
2025-10-23 15:53:11 +02:00

65 lines
1.7 KiB
Markdown

# Nginx PHP-FPM for Ubuntu 24.04 Server
[![OS](https://img.shields.io/badge/ubuntu-24.04-E95420)](#)
[![Shell](https://img.shields.io/badge/shell-bash-121011)](#)
[![WebServer](https://img.shields.io/badge/server-nginx-009639)](#)
[![PHP](https://img.shields.io/badge/php-fpm-777BB4)](#)
[![License](https://img.shields.io/badge/License-MIT-green)](./LICENSE)
Automated Bash installer script for deploying Nginx with PHP-FPM on Ubuntu 24.04 Server.
This is a **production-focused installer**, not a demo.
---
### Preparing
Update your package index before running the installer:
```
sudo apt update -y
```
### Download the Script
Clone the repository from your Git server:
```
git clone https://git.x-files.dk/webserver/nginx-ubuntu.git
```
```
cd nginx-ubuntu
```
### Usage
Run the script using:
```
sudo ./nginxinstall
```
---
#### Nginx Configuration Includes
- A directory called **nginx-snippets** in `/etc/nginx`, containing reusable snippets for clean and readable setups.
- Cloudflare Real IP configuration to ensure proxied IPs are correctly displayed.
- The default website answering on the server IP address is disabled and returns **444** (drops TCP connection).
- Bad bots blocking file, CSP, and SSL configurations (can be customized).
- Custom error pages located in `/etc/nginx-snippets/errorpages` (editable as needed).
---
### Notes
This setup includes enhanced caching, which is left commented out in the nginx.conf file after installation. You can enable and adjust it according to your needs.
---
### More Information
More guides and documentation can be found on [wiki.x-files.dk](https://wiki.x-files.dk)
---
### License
Licensed under the [MIT License](./LICENSE).
---