News for hackers. Stuff that matters.
Re:Nginx for Developers: An Introduction by thu on Wednesday June 19, 2013 @11:54AM (#5906256)
I think the sites-available is a debianism, not present on all distros. One nice thing that nginx supports is include directives with wildcards so you can e.g. have /srv/example.com/nginx.conf and /srv/api.example.com/nginx.conf and include them in the main configuration file with include /srv/*/nginx.conf.
Re:Nginx for Developers: An Introduction by merlincorey on Wednesday June 19, 2013 @05:53PM (#5908603)
Today You Learn that is because the original package maintainer of the NginX package in Debian (and thus later, Ubuntu) simply copied the structure of the Apache package. It's most useless because there is no script to manage the sites available like with apache.

I have been complaining about this for years!

On FreeBSD and all my client's sites (whether they run Linux or what), I always set mine to include sites/*.conf and delete those apache-isms.

Re:Nginx for Developers: An Introduction by vacri on Wednesday June 19, 2013 @10:37PM (#5909823)
It's especially bizarre given how trivial such a script is - as far as I am aware, it's a glorified symlink-maker.

Hrm, looking now, a2ensite is 340 lines long...

Re:Nginx for Developers: An Introduction by merlincorey on Thursday June 20, 2013 @04:48AM (#5910943)
Quite the glorified symlink maker!

It is my experience from years of administration that `ln` and `rm` (or perhaps `mv`) are the only commands necessary to work with the directories without the scripts.

Re:Nginx for Developers: An Introduction by 616c on Thursday June 20, 2013 @08:15AM (#5911553)
You know how many times I had to restart the nginx daemon on a VPS for me to figure this out. Thank you for complaining!
Re:Nginx for Developers: An Introduction by Livven on Wednesday June 19, 2013 @08:36PM (#5909451)
There are "official" nginx packages for Ubuntu and other major Linux distributions which are always up-to-date and use a standard conf.d directory for including configuration files http://nginx.org/en/linux_packages.html
Re:Nginx for Developers: An Introduction by ChikkaChiChi on Wednesday June 19, 2013 @12:55PM (#5906687)
I may be misunderstanding you, but sites-available and the conf files are usually two separate entities. sites-available | sites-enabled is analogous to using a2ensite in Apache without the automagic (you symlink yourself)
Re:Nginx for Developers: An Introduction by chc on Wednesday June 19, 2013 @01:08PM (#5906777)
On systems that have both, yes, they're separate. But that separation is something the distribution does to help you organize your rules — to nginx, they're all the same AFAIK.
Re:Nginx for Developers: An Introduction by GibbyBorn on Wednesday June 19, 2013 @01:11PM (#5906785)
It's distro-specific and it doesn't present by default in stock nginx.
Re:Nginx for Developers: An Introduction by callmeed on Wednesday June 19, 2013 @01:01PM (#5906724)
Yeah, I run nginx on both Ubuntu and RedHat boxes. On RedHat, the conf files go in /opt/nginx/conf ... there is no sites-avail/enabled
Re:Nginx for Developers: An Introduction by jlogsdon on Wednesday June 19, 2013 @01:38PM (#5906951)
He did mention specifically that the structure was provided by the `apt` install.
Re:Nginx for Developers: An Introduction by lowboy on Wednesday June 19, 2013 @01:04PM (#5906749)
I ran into a version of Nginx on CentOS had sites-avail/enabled.
Re:Nginx for Developers: An Introduction by ciclista on Wednesday June 19, 2013 @03:48PM (#5907744)
I'm currently running Centos 6 on my VPS and it has this file structure.