Summary: | www-servers/nginx: Saner default configuration | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Torbjörn Lönnemark <tobbez> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | CC: | ago, anrock623, bugs, dev-zero, proxy-maint |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Torbjörn Lönnemark
2016-03-04 07:46:30 UTC
I agree with this. I also think we should incorporate the `sites-{enabled,available}` concept since it seems to be widely accepted by now. I suggest you post a new default config (I could even see starting off debian's) and we can perhaps do feedback-rounds based on that? I agree with Torbjörn in general. However keep in mind that while gzip is disabled per default, most people using nginx probably have gzip enabled (common use case is web server). If we change a default we are installing for 10 years now [see v1.1 at 1] we will force most people to alter their configuration if they want to keep gzip ratio in their logs. If we do that, where do we stop? For example I am already using a setup like Johan is now thinking about: /etc/nginx/ ├── common │ ├── no-dot-files.conf │ ├── no-favicon.conf │ ├── no-robots.txt.conf ├── fastcgi.conf ├── mime.types ├── nginx.conf ├── php │ ├── example.org-backend-php.conf │ ├── example.org-default-php.conf │ └── localhost-default-php.conf ├── sites-available.d │ ├── 00default │ ├── example.org │ └── localhost └── sites-enabled.d ├── 00default -> ../sites-available.d/00default ├── example.org -> ../sites-available.d/example.org └── localhost -> ../sites-available.d/localhost As you can see I already got rid of fastcgi_params [2]. But is this suitable for most users? I am undecided if we should follow upstream strictly or introduce a Gentoo way. When it comes to Debian's configuration I am not sure if we should set tcp_nopush or tcp_nodelay. It can work for you, but this can also be causing problems. At the moment I would prefer to stick with upstream's default. People should alter their configuration on purpose when they know what they are doing. Setting "worker_process" to "auto" is something we should do (matches Gentoo's default). [1] https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-servers/nginx/files/nginx.conf?view=log [2] https://blog.martinfjordvald.com/2013/04/nginx-config-history-fastcgi_params-versus-fastcgi-conf/ (In reply to Thomas Deutschmann from comment #2) > I agree with Torbjörn in general. > > However keep in mind that while gzip is disabled per default, most people > using nginx probably have gzip enabled (common use case is web server). If > we change a default we are installing for 10 years now [see v1.1 at 1] we > will force most people to alter their configuration if they want to keep > gzip ratio in their logs. > > If we do that, where do we stop? > > For example I am already using a setup like Johan is now thinking about: > > /etc/nginx/ > ├── common > │ ├── no-dot-files.conf > │ ├── no-favicon.conf > │ ├── no-robots.txt.conf > ├── fastcgi.conf > ├── mime.types > ├── nginx.conf > ├── php > │ ├── example.org-backend-php.conf > │ ├── example.org-default-php.conf > │ └── localhost-default-php.conf > ├── sites-available.d > │ ├── 00default > │ ├── example.org > │ └── localhost > └── sites-enabled.d > ├── 00default -> ../sites-available.d/00default > ├── example.org -> ../sites-available.d/example.org > └── localhost -> ../sites-available.d/localhost > > > As you can see I already got rid of fastcgi_params [2]. > > But is this suitable for most users? I am undecided if we should follow > upstream strictly or introduce a Gentoo way. + 1 for following upstream strictly. At first look, if there is an upstream default configuration, I think we should just install that and allow users to adjust things as they need to. |