Live data from Hacker News

Nginx for Developers: An Introduction

carrot.is

71–80 of 142 posts

Re: Nginx for Developers: An Introduction

#72

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…

This is great, I've been on the fence about firing up a VPS or two rather than use Heroku, this may be just what I need to get going.

Re: Nginx for Developers: An Introduction

#73
post #68
post #63

Earlier quoted context omitted.

It sounds scarier than saying: "If you use PHP, remember to set the following in your .ini" cgi.fix_pathinfo = 0

So not zero day and not an exploit. A terrible idea for a feature though, PHP seems to be rich with those.

Not really a terrible idea at all. They are simply conforming to the CGI specification. In realizing the potential security issues associated with doing so, they offer a way to disable that behavior.

Re: Nginx for Developers: An Introduction

#74
post #49

I like just keeping a single "etc/nginx/sites" folder, including "sites/*.ON" in my main nginx.conf and then appending .ON to the sites that are enabled: active.site.com.ON another.active.com.ON not.active.com

That's clever. Coming from Apache I was disappointed not to see something equivalent to: a2ensite (site)

You can also use the Debian-style setup with sites-enabled/*, though I don't know of enable/disable scripts for nginx.

Re: Nginx for Developers: An Introduction

#75

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've actually had your article bookmarked for some time. I got it from the nginx wiki page at http://wiki.nginx.org/Configuration . I was more surprised than depressed about the upvotes for the current article. It really makes me wonder if the technical level of the audience here hasn't declined substantially. The current article is well written but it's aimed at a "Dummies" rather than developer level.

yeah, you got to checkout the number of twitter bootstrap tutorials.

Re: Nginx for Developers: An Introduction

#77

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…

Nice. One step I would add is after restarting ssh and before rebooting while still logged in as root is to start a second ssh session, log in as the new user, and verify you can sudo.

Your current instructions are predicated on success. By verifying your new user login and sudo capability before logging out as root (rebooting), you can fix typos or other Bad Things. Not that I would ever make a typo while editing sudoers. ;-)

Re: Nginx for Developers: An Introduction

#78
post #8

Completely off-topic: Is that a custom WP theme? I love the look and feel of this article. On-topic: Thank you for this. I am going to purchase a DO box this weekend and play around with nginx instead of apache. For some reason when I last tried to use nginx, I could not get location {} to work. Granted it was some time ago. Does anyone have any resources on nginx as a load balancer?

Avoid using Digital Ocean(DO). We had very very bad experience with them, file-system corruption, hardware failures. And we are still unable to recover all our data. And so far, no hope! They don't answer any of the questions properly, my team is very upset. We felt, they don't have much technical expertise in managing servers. DO might be okay for testing and learning, but never use them for any production setups. U…

My experience is that every host has it's pros and cons. I never trust these types of statements.

Just because you didn't perform backups, it doesn't mean that you should blame the host.

Even the best-of-the-best hosts will fail, but thing to consider is how fast can they resolve issues and are they proactively trying to improve.

Re: Nginx for Developers: An Introduction

#79
post #46
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.

I ran into a version of Nginx on CentOS had sites-avail/enabled.

I'm currently running Centos 6 on my VPS and it has this file structure.

Re: Nginx for Developers: An Introduction

#80
I've always wanted to use nginx to build web apps in Lua .. does anyone know/can recommend any great tutorials with this in mind? It'd be nice if I could learn how to use nginx+lua to build a blog, and so on .. I'll use google, but on the off chance someone on HN knows of something already, I'm all ears ..
Post reply on HN