Bug 2393382

Summary: nginx-upgrade: Support custom PID and config file locations
Product: [Fedora] Fedora Reporter: overact_ninetieth160
Component: nginxAssignee: Felix Kaechele <felix>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: felix, jorton, luhliari, mikel, pavel.lisy, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: nginx-1.28.3-1.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-04-25 01:25:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description overact_ninetieth160 2025-09-04 22:17:05 UTC
The nginx-upgrade script assumes that the PID file is at /run/nginx.pid and does not check if nginx runs with a custom -c parameter for the config file.

The upstream upgrade script supports both: https://github.com/nginx/pkg-oss/blob/master/rpm/SOURCES/nginx.upgrade.sh
There, the config file location can be set in /etc/sysconfig/nginx and the PID file location is read from the unit configuration. The nginx.service unit file is adapted accordingly.

Customizing these locations is useful when one wants to run nginx as non-root and to avoid modifying the RPM-tracked default nginx.conf.

I also cannot help but notice that the upstream RPM spec is significantly less complex than the Fedora RPM sources. I have been running nginx from the developer repositories on RHEL 9 and 10 with the non-root "nginx" user and heavy systemd sandboxing quite successfully and it would be great to be able to do the same on Fedora Server. Thank you for your time.

Reproducible: Always

Comment 1 Fedora Update System 2026-03-25 19:14:48 UTC
FEDORA-2026-4de4d247a0 (nginx-1.28.3-1.fc44, nginx-mod-brotli-1.0.0~rc-7.fc44, and 5 more) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-4de4d247a0

Comment 2 Fedora Update System 2026-03-26 04:03:05 UTC
FEDORA-2026-4de4d247a0 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-4de4d247a0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-4de4d247a0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2026-04-25 01:25:02 UTC
FEDORA-2026-4de4d247a0 (nginx-1.28.3-1.fc44, nginx-mod-brotli-1.0.0~rc-7.fc44, and 5 more) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.