News for hackers. Stuff that matters.
Re:Useful Rewrites for Nginx by klochner on Tuesday March 29, 2011 @03:06PM (#2383928)
Anyone know why they're trying to handle https requests on port 80?

   server {
     listen 80;
     server_name bedom.com;
     rewrite ^(.*)$ $scheme://www.bedom.com$1;
   }
Re:Useful Rewrites for Nginx by krutten7 on Tuesday March 29, 2011 @04:43PM (#2384367)
I've seen many people copy/paste blocks and forget to change the http to https (or vice-versa) so this rewrite is safer as it can go in either block. You spend less time debugging.
Re:Useful Rewrites for Nginx by marcc on Tuesday March 29, 2011 @03:23PM (#2383999)
I don't see it. Where does this say https?
Re:Useful Rewrites for Nginx by WALoeIII on Tuesday March 29, 2011 @03:50PM (#2384104)
$scheme would work with the current request's scheme, so http or https. Its a micro-optimization at best to make it http:// instead.