By default configuration cause error 404 in directory starting with 'doc'

Bug #840358 reported by Xan on 2011-09-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nginx (Ubuntu)
Undecided
Unassigned

Bug Description

In nginx package 0.8.54-4 (and I think in next versions too), by default apt put the lines:

location /doc {
  root /usr/share;
  autoindex on;
  allow 127.0.0.1;
  deny all;
 }

in /etc/nginx/site-enabled/default

This is wrong: we have to change "location /doc" for "location /doc/". Else, if we add a directory starting with "doc" (for example "doci") in /var/www, we receive error 404 from nginx.

It's clear a wrong configuration line.

Regards,
Xan.

PS: References [http://forum.nginx.org/read.php?2,214663]

PPS: I think debian packages also has this bug.

Xan (dxpublica) on 2011-09-03
summary: - Error in configuration cause error 404 in directory starting with 'doc*'
+ By default configuration cause error 404 in directory starting with
+ 'doc*'
Xan (dxpublica) on 2011-09-03
summary: By default configuration cause error 404 in directory starting with
- 'doc*'
+ 'doc'

Although, I do not agree that this is a bug, I will change the default configuration file so people that don't bother to read or understand any of it are less confused. The change has now been made upstream.

Changed in nginx (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nginx - 1.1.8-1

---------------
nginx (1.1.8-1) unstable; urgency=low

  [Kartik Mistry]
  * New upstream release.
  * debian/modules/chunkin-nginx-module:
    + Removed as of now, as it breaks with Perl 5.14 (Closes: #649061)

  [Michael Lustfield]
  * debian/control:
    + Added Map module to nginx-light modules list.
  * debian/rules:
    + Removed --without-http_map_module form nginx-light.
  * debian/nginx-common.install:
    + Changed ufw profile installation (LP: #825349).
      - debian/ufw.profile -> debian/ufw/nginx.
  * debian/nginx-common.preinst:
    + Cleanup of moved nginx profile.
  * debian/conf/nginx.conf:
    + Added a default map for $server_https (on|off).
  * debian/conf/fastcgi_params:
    + Pass HTTPS so $_SERVER['HTTPS'] is set (LP: #857831).
  * debian/conf/mime.types:
    + Added json type (LP: #883440).
  * debian/conf/sites-available/default:
    + Added notes about PHP (Closes: #642995).
    + Changed location /doc from root to alias.
    + Changed location /doc to /doc/ for people that don't bother reading or
      learning anything about Nginx configuration files (LP: #840358).

 -- Kartik Mistry <email address hidden> Fri, 18 Nov 2011 23:44:00 +0530

Changed in nginx (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers