Bug 1409685

Summary: a typo for 404 handler in the default server section
Product: [Fedora] Fedora EPEL Reporter: (GalaxyMaster) <gm.outside+redhat>
Component: nginxAssignee: Felix Kaechele <felix>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: epel7CC: affix, athmanem, bperkins, jeremy, jkaluza, pavel.lisy, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nginx-1.16.1-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-01 00:30:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description (GalaxyMaster) 2017-01-03 01:47:51 UTC
Description of problem:

There is a minor typo in the default server definition in /etc/nginx/nginx.conf

How reproducible:

# rpm -q nginx
nginx-1.10.2-1.el7.x86_64
# fgrep -A2 404.html /etc/nginx/nginx.conf
        error_page 404 /404.html;
            location = /40x.html {
        }
--
#        error_page 404 /404.html;
#            location = /40x.html {
#        }
# ls -1 /usr/share/nginx/html/*.html
/usr/share/nginx/html/404.html
/usr/share/nginx/html/50x.html
/usr/share/nginx/html/index.html
#

The intent of the "location = /40x.html" block was to inhibit any additional processing when a user hits a 404 error, however it seems that the line was copy-n-pasted from the 50x handler, was not properly updated, and become a no-op block in this configuration.

I think that the "location = /40x.html" lines should be fixed to be "location = /404.html" to achieve the desired effect.

P.S. The indentation in /etc/nginx/nginx.conf looks weird, e.g. these location definitions for error pages look weirdly indented.
P.P.S. Also the content of the error pages refers to Fedora while the package can be installed on RHEL and CentOS -- I'd suggest replace "Fedora" in the error page content with "EPEL" or something similar.

Comment 1 Fedora Update System 2020-09-16 00:53:11 UTC
FEDORA-EPEL-2020-0f3f88c479 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-0f3f88c479

Comment 2 Fedora Update System 2020-09-16 14:40:04 UTC
FEDORA-EPEL-2020-0f3f88c479 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-0f3f88c479

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

Comment 3 Fedora Update System 2020-10-01 00:30:56 UTC
FEDORA-EPEL-2020-0f3f88c479 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.