Live data from Hacker News

Nginx for Developers: An Introduction

carrot.is

31–40 of 142 posts

Re: Nginx for Developers: An Introduction

#31

Been thinking about nginx for some time. If I could get an easy Mono/F# implementation working with it, I'd jump on it in a heartbeat.

try this:

https://github.com/NancyFx/Nancy/wiki/Hosting-Nancy-with-Ngi...

it worked perfectly for me on digitalocean

Re: Nginx for Developers: An Introduction

#32
post #18

Earlier quoted context omitted.

Yeah, I disliked that part to. The commands you need to know is: nginx -t (test your configuration) nginx -s reload (reload your configuration) Also I prefer "nginx -s restart".

Great feedback guys - we'll look this over and probably change it in the article : ) The reason it's as such is because of what @timroman said in his reply, but if this method is no different and scales better no reason not to use it instead.

Possibly want to compare when to use restart and reload, and the drawbacks of both.

Re: Nginx for Developers: An Introduction

#33
What makes this "for developers"? Whats the difference if a sysadmin is reading this, or a Linux user?

Im surprised to see this on the frontpage, it is less than basics in anything any hacker worth its name can do.

Re: Nginx for Developers: An Introduction

#34
post #33

What makes this "for developers"? Whats the difference if a sysadmin is reading this, or a Linux user? Im surprised to see this on the frontpage, it is less than basics in anything any hacker worth its name can do.

I think it should read "Web Developers" - those who may be less experienced in setting up a web server like nginx.

Re: Nginx for Developers: An Introduction

#36
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 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

#37
post #35

For starter nginx's configuration, the h5bp nginx config [1] is pretty awesome, e.g. sending correct mime types, protecting hidden files, cross domain webfont, expires, gzip, server tunings all included. [1] https://github.com/h5bp/server-configs/tree/master/nginx

Great suggestion, thanks @tszming!

Re: Nginx for Developers: An Introduction

#38
post #6

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?

Actually it's a very simple custom non-wordpress theme I put together in about an hour, the entire thing built on top of http://roots.cx dynamic content : ) Another note, the share button at the bottom (just pushed a minute ago so hard refresh if it's cached) is from this plugin we put together and have been enjoying so far: https://github.com/carrot/share-button Glad you enjoyed the article! Let us know if you run i…

I can't read the article on my Android phone because I can't resize it to fit on screen. So please remove the theme or fix it...

Re: Nginx for Developers: An Introduction

#39
This article is just fine for IDE-side development, but I would not recommend for anyone to use the version of nginx in the standard Ubuntu package manager. It traditionally is several version back missing important key features that you might want to take advantage of.

Re: Nginx for Developers: An Introduction

#40

Good article. Be wary of the well documented zero-day exploits if you're using php. This is one of my other favorite articles: http://docs.ngx.cc/en/latest/topics/tutorials/config_pitfall... Some good introductory stuff here as well: http://pineapple.io/resources/tagged/nginx

That first article was awesome. I found 2 things in my configs that were security holes :/
Post reply on HN