N
SepehrSabzPackage Mirrors
mirror online

nginx-mirror / official web server packages

Install official NGINX stable or mainline packages through the local mirror at mirror.sepehrsabz.ir/nginx. Packages remain verified with the upstream NGINX signing key.

01 — APT REPOSITORY

Ubuntu and Debian

Install the mirrored signing key, then add the repository matching your distribution.

install signing key
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://mirror.sepehrsabz.ir/nginx/packages/keys/nginx_signing.key | sudo gpg --dearmor --yes -o /etc/apt/keyrings/nginx.gpg
sudo chmod a+r /etc/apt/keyrings/nginx.gpg
/etc/apt/sources.list.d/nginx.list
deb [signed-by=/etc/apt/keyrings/nginx.gpg] https://mirror.sepehrsabz.ir/nginx/packages/ubuntu noble nginx

For Ubuntu 22.04, replace noble with jammy.

/etc/apt/sources.list.d/nginx.list
deb [signed-by=/etc/apt/keyrings/nginx.gpg] https://mirror.sepehrsabz.ir/nginx/packages/debian bookworm nginx
/etc/apt/sources.list.d/nginx.list
deb [signed-by=/etc/apt/keyrings/nginx.gpg] https://mirror.sepehrsabz.ir/nginx/packages/debian trixie nginx
install stable NGINX
sudo apt update
sudo apt install -y nginx
02 — DNF / YUM REPOSITORY

AlmaLinux, Rocky Linux, and RHEL

/etc/yum.repos.d/nginx.repo
[nginx-stable]
name=NGINX Stable - SepehrSabz Mirror
baseurl=https://mirror.sepehrsabz.ir/nginx/packages/rhel/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirror.sepehrsabz.ir/nginx/packages/keys/nginx_signing.key
module_hotfixes=true
install and start
sudo dnf install -y nginx
sudo systemctl enable --now nginx
03 — PACKAGE CHANNELS

Stable or mainline

ChannelMirror pathBest fit
Stable/nginx/packages/Conservative feature cadence
Mainline/nginx/packages/mainline/Newest features and fixes

To use mainline, insert mainline/ after /packages/ in the APT or RPM URL. Do not enable both channels simultaneously.

04 — VERIFY

Confirm the package and service

shell
nginx -v
systemctl --no-pager --full status nginx
curl -I http://127.0.0.1/

The local request should return an HTTP response from NGINX. Open TCP ports 80 and 443 in your firewall only as required.

05 — NOTES
Check configuration before every reload. Run sudo nginx -t, then apply a valid change with sudo systemctl reload nginx.

Distribution-provided NGINX packages and nginx.org packages can use different module packaging and defaults. Review existing configurations before switching an already deployed server.