phusion / passenger_apt_automation

Tools for automatically building a Debian APT repository for Phusion Passenger
MIT License
20 stars 20 forks source link

Sync nginx configuration with Debian upstream #7

Closed drybjed closed 9 years ago

drybjed commented 9 years ago

In Debian nginx package, from version 1.6.1, Debian is using upstream configuration files, which includes /etc/nginx/fastcgi.conf.

Unfortunately, nginx package from Phusion does not have this change and fastcgi.conf file, which prevents me from using it on installation where other applications might need it. Is there a chance to add /etc/nginx/fastcgi.conf configuration file to the Phusion nginx package?

FooBarWidget commented 9 years ago

I've been looking into the new upstream Debian packages but there have been a lot of changes. They removed Naxsi, they moved all kinds of stuff, etc. Unlike Debian, we're trying to make packages that support even older distros such as Debian 6 and Ubuntu 10.04. As the newer Debian packages diverge more and more from the older packages, it becomes increasingly harder for us to maintain the packages.

We'll try to merge the fastcgi.conf thing, but no guarantees. It depends a lot on the priority of other open issues.

But why can't you use our packages? Our packages simply supply default configuration files, but we don't overwrite whatever custom config files you have. You can simply drop your own nginx.conf and fastcgi.conf in /etc/nginx.

drybjed commented 9 years ago

Thanks for the quick response, @FooBarWidget :-) I'm actually using Passenger via debops.nginx Ansible role. To keep as much compatibility with Debian as possible, I don't provide /etc/nginx/fastcgi.conf via the role to not create unnecessary conflicts.

I actually check the nginx version to handle the case of fastcgi.conf not being there in the first place. However since your nginx package, despite being >1.6.1, does not have that file, it caused an error. I suppose that I could add another condition and check if nginx flavor I use is either official one or Passenger, and that should solve my problem. However, it would be nice to see it included in your package to avoid similar issues when other software starts to use /etc/nginx/fastcgi.conf more.

FooBarWidget commented 9 years ago

If you're using Ansible, wouldn't it be better for you to control the entire /etc/nginx directory instead of checking the version number?

drybjed commented 9 years ago

Perhaps, with time... Right now I don't need to modify all of the files in /etc/nginx/, so I would need to divert them and then push my own copies which would be the same... So that's not useful to have for the moment.

I'm checking nginx version to support nginx package from Debian Wheezy, which does not have SPDY support - in that case I need to omit it from the generated configuration files. Adding another condition based on the nginx version and type of server I'm currently using (normal, Passenger), was easy. It's already included in the role. :)

FooBarWidget commented 9 years ago

This change has been implemented as part of the support for Debian 8 and Ubuntu 15.04.