Bug 591543

Summary: The default nginx configuration will cause problems when using the existing vhost config file
Product: [Fedora] Fedora EPEL Reporter: Frantic <tudor.prodan>
Component: nginxAssignee: Jeremy Hinegardner <jeremy>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: el5CC: jeremy
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nginx-0.6.39-5.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-09 05:59:31 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 Frantic 2010-05-12 14:25:48 UTC
Description of problem:
The default nginx configuration will cause problems when using the existing vhost config file

How reproducible:
Install nginx.el5, you will have /etc/nginx/nginx.conf which will contain:
...
include /etc/nginx/conf.d/*.conf;
...
# The default server
server {
    listen       80;
    server_name  _;
...

There will also be /etc/nginx/conf.d/virtual.conf which has an example of how to set up a vhost. Define a simple name-based vhost inside:

server {
    server_name testvhost.localhost;
    # set up root, etc
}

Actual results:
At http://localhost/, you will get the testvhost.localhost host.

Expected results:
At http://localhos/, you should get the default vhost (_).

Additional info:
testvhost.localhost works as expected.
In order to get the expected result, I've moved the "include conf.d" part after the default server setup.

Comment 1 Jeremy Hinegardner 2010-06-20 23:02:45 UTC
This exists in all the Fedora releases too. Fixing there also.

Comment 2 Fedora Update System 2010-06-20 23:38:24 UTC
nginx-0.6.39-5.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/nginx-0.6.39-5.el5

Comment 3 Fedora Update System 2010-06-22 01:09:37 UTC
nginx-0.6.39-5.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update nginx'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/nginx-0.6.39-5.el5

Comment 4 Fedora Update System 2010-07-09 05:59:27 UTC
nginx-0.6.39-5.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.