Live data from Hacker News

Nginx for Developers: An Introduction

carrot.is

111–120 of 142 posts

Re: Nginx for Developers: An Introduction

#111

It's kinda depressing that this article is basically just a copy of one I wrote in 2010 and it's still something that gets attention as interesting stuff. Nginx documentation obviously still has a long way to go.

I instantly thought of your article when I saw this one. I also defended NginX's documentation and linked to the actual documentation, which I think most people forget exists over at http://nginx.org/en/docs/ .

The official nginx documentation is better but it's still mostly just an API documentation, there's no red thread through it to tell people "read this first, then this and then jump over here".

Since this kind of article still gathers this amount of popularity 3 years later I actually do think it's a problem of the documentation.

Re: Nginx for Developers: An Introduction

#112
post #87

Slightly off-topic, but I'm sad that people still use apt-get. aptitude is pretty much just better[1]. Also, if you're reading this article you probably don't need the slightly better performance/throughput of nginx. Nginx's configuration is just terrible. You can cause segfaults and all sorts of unexpected behavior with the If directive[2]. And who came up with the idea that rewrite[3] should sometimes redirect inst…

I'm extremely biased as I have been using NginX for many years now; however, I've got to completely disagree with you. NginX's configuration is beautiful, elegant, and concise. It kicks the ever living crap out of configuring Apache or Lighttpd (the two other HTTPd's I have extensive experience with). It seems so strange, because it's different . NginX's configuration language is declarative . If is imperative and ac…

Yes, I linked to IfIsEvil. The fact that you need a page to document the horrible behavior because it's too late to fix it is a sign that something is very wrong with the config syntax.

Re: Nginx for Developers: An Introduction

#113
post #107

Earlier quoted context omitted.

Disabling root login without changing to using ssh-keys for authentication doesn't really buy you a whole lot of security; you can still access the box and root with knowing just one password -- the only thing you've avoided are brute force attempts against the root account. With sudo and only keys based access, the attacker will need to get a copy of the key (barring any new problems with key generation, like the De…

What does visudo do that nano -w doesn't? I've never understood this properly.

Locks to only one editing user and confirms syntax is clean before saving. I'm not aware of nano enforcing correct sudoers syntax. Plus plenty of us don't like nano.

man visudo for more info.

Re: Nginx for Developers: An Introduction

#114

If you like this article, I wrote a similar one called Devops for Dummies. http://tech.pro/tutorial/1335/devops-for-dummies-vps-configu... It teaches you how to setup a DigitalOcean (or any other) VPS from scratch to host N amount of Rails applications using Nginx and Passenger. It took me some time to get things working properly and I distilled it into this short article that holds your hand and takes you from A to…

Could I take your article and use it as a base for a Python version of that?

Feel free to use it. I wrote it to:

A) Solidify what I had learned by putting it into writing.

B) Help others avoid my dumb mistakes.

So if it helps people I'm all for it. :)

Re: Nginx for Developers: An Introduction

#115
post #87

Slightly off-topic, but I'm sad that people still use apt-get. aptitude is pretty much just better[1]. Also, if you're reading this article you probably don't need the slightly better performance/throughput of nginx. Nginx's configuration is just terrible. You can cause segfaults and all sorts of unexpected behavior with the If directive[2]. And who came up with the idea that rewrite[3] should sometimes redirect inst…

Well Ubuntu doesn't ship aptitude by default any more which would explain parts of it.

Ah, that's unfortunate. https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/5...

Re: Nginx for Developers: An Introduction

#116
post #10

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.

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/*.c…

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

#117
post #86

If you like this article, I wrote a similar one called Devops for Dummies. http://tech.pro/tutorial/1335/devops-for-dummies-vps-configu... It teaches you how to setup a DigitalOcean (or any other) VPS from scratch to host N amount of Rails applications using Nginx and Passenger. It took me some time to get things working properly and I distilled it into this short article that holds your hand and takes you from A to…

One thing I would recommend is searching for deals on LowEndBox[1] blog. Most of the popular VPS's are ridiculously overpriced compared to what you can find on LowEndBox. It's a good site to get advice and reviews of various VPS providers, too. [1] - http://www.lowendbox.com/

Why would anyone need to search LowEndBox, when they can get top tier cloud servers from DigitalOcean(which is linked on the original post)? There is absolutely no reason to use providers from LowEndBox with grandma's SolusVM, when you can spin up a server with DO anytime you want and pay by the hour?

And not to mention, how these providers are ddosing and hacking one another regularly.

Re: Nginx for Developers: An Introduction

#118
post #87

Slightly off-topic, but I'm sad that people still use apt-get. aptitude is pretty much just better[1]. Also, if you're reading this article you probably don't need the slightly better performance/throughput of nginx. Nginx's configuration is just terrible. You can cause segfaults and all sorts of unexpected behavior with the If directive[2]. And who came up with the idea that rewrite[3] should sometimes redirect inst…

Aptitude is awesome and it's in my fingers, but it's slightly different from apt-get... which may turn into a problem if you do stuff with something like puppet, which uses apt-get.

I think I also had to install aptitude on this box (ub 12.04) as it only came with apt-get installed - apt-get is more universal.

Edit: Hrm. 'aptitude' is not the tool of choice for dist-upgrading Debian. I was fresh-installing my debian laptop last year from testing to sid and it was failing to work properly. Hunting down the issue online, it turns out that for dist-upgrades, you just use apt-get. One of those domain-knowledge gotchas :/ Used apt-get, and it went flawlessly.

Re: Nginx for Developers: An Introduction

#120
post #86

Earlier quoted context omitted.

One thing I would recommend is searching for deals on LowEndBox[1] blog. Most of the popular VPS's are ridiculously overpriced compared to what you can find on LowEndBox. It's a good site to get advice and reviews of various VPS providers, too. [1] - http://www.lowendbox.com/

LowEndBox is great for non-mission critical servers. You aren't going to find many top tier providers on there, mostly smaller companies. I got a dedicated box (quad Xeon, 24GB RAM, 500GB) for $49/m.

Who's the provider you're renting the box from ?
Post reply on HN