Upgrading nginx to 1.10.1-3 fails on unknown directive

Bug #1634477 reported by Koen Punt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Tracker for teward's PPAs
New
Undecided
Unassigned

Bug Description

When one of the serverblocks contains directives supplied by one the additional modules, e.g. `echo`, I found that the installation is failing, which causes that the complete upgrade process breaks.

```
Setting up libnginx-mod-http-auth-pam (1.10.1-3+trusty0) ...
nginx: [emerg] unknown directive "echo" in /etc/nginx/sites-enabled/example.com.conf:126
dpkg: error processing package libnginx-mod-http-auth-pam (--configure):
 subprocess installed post-installation script returned error exit status
```

Revision history for this message
Koen Punt (koenpunt) wrote :
Revision history for this message
Koen Punt (koenpunt) wrote :

Real issue might just be that the dynamic module isn't correctly linked. Because removing the offensive line from the configuration and retrying the upgrade completes without errors, but the `echo` directive in the configuration isn't working either..

Revision history for this message
Troy Jendra (troyjendra) wrote :

I also have the same issue trying to use fastcgi_cache_purge.

This is a major problem since the older versions aren't kept in the ppa.

Revision history for this message
Troy Jendra (troyjendra) wrote :

I've found a solution to my problem. This latest nginx package uses external modules, so you have to have the following line in /etc/nginx/nginx.conf, "include /etc/nginx/modules-enabled/*.conf;". I had a custom nginx.conf that didn't include this line. After adding the line, the 'unknown directive' problem went away.

I still had a problem with libnginx-mod-http-perl clashing with nginx-extras 1.10.1-0+trusty0, but I ran 'aptitude upgrade' repeatedly until all the error messages went away. Everything seems to be working now.

==================

dpkg: error processing archive /var/cache/apt/archives/libnginx-mod-http-perl_1.10.1-3+trusty0_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/perl5/auto/nginx/nginx.so', which is also in package nginx-extras 1.10.1-0+trusty0

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.