Adding in SSL termination and HSTS compliance because it’s the right thing to do.
Read the whole story
Read the whole story
and note that the colon and semicolon characters have to be escaped with backslashes or things will break!
If spaces have to be entered in strings, then they must be
preceded by a backslash ('\') to be escaped. Backslashes also have to be
escaped by doubling them.
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993177#p28993177:332zlkn4 said:bthylafh[/url]":332zlkn4]In before the nth iteration of WHY ISN'T ARS HTTPS WHARRGARBL.
The unencrypted Web is on the way out, and that’s a good thing. We’re still making the switch here at Ars—subscriptors can use HTTPS today, but we’re still working out the mixed content kinks for everyone else (the main holdup is handling the ad networks. Since subscriptors don’t see ads, there’s no holdup there!).
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:1161xadj said:MartinHatch[/url]":1161xadj]Seems like an awful lot of work.
My IIS site it was a case of:
Where's that BINGO board?[url=http://meincmagazine.com/civis/viewtopic.php?p=28993181#p28993181:3vglvpc6 said:vnicolici[/url]":3vglvpc6]and note that the colon and semicolon characters have to be escaped with backslashes or things will break!
Actually you have to escape the space characters. From the documentation:
If spaces have to be entered in strings, then they must be
preceded by a backslash ('\') to be escaped. Backslashes also have to be
escaped by doubling them.
It's just as simple for that with nginx as well, if you're going with straight nginx.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:13yu3ems said:MartinHatch[/url]":13yu3ems]Seems like an awful lot of work.
My IIS site it was a case of:
* Install SSL cert
* Configure site bindings
* Setup URL Rewrites
the last step simply performs a 302-permanent redirect to anyone trying to use normal HTTP
You forgot a few steps...[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:2jfuyrkf said:MartinHatch[/url]":2jfuyrkf]Seems like an awful lot of work.
My IIS site it was a case of:
* Install SSL cert
* Configure site bindings
* Setup URL Rewrites
the last step simply performs a 302-permanent redirect to anyone trying to use normal HTTP
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993177#p28993177:2khdf8be said:bthylafh[/url]":2khdf8be]In before the nth iteration of WHY ISN'T ARS HTTPS WHARRGARBL.
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:3c7es12h said:MartinHatch[/url]":3c7es12h]Seems like an awful lot of work.
server {
listen 80;
server_name example.org www.example.org;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl spdy;
ssl on;
server_name example.org www.example.org;
ssl_certificate /path/to/ssl/certificate/cert.chained.crt;
ssl_certificate_key /path/to/ssl/certificate/cert.key;
ssl_trusted_certificate /path/to/ssl/certificate/cert.chained.full.crt;
ssl_session_timeout 24h;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4;
ssl_dhparam /path/to/ssl/dhparam.pem;
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8;
ssl_session_cache shared:SSL:3m;
spdy_chunk_size 8k;
spdy_headers_comp 3;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
log_not_found off;
charset utf-8;
location / {
root /var/www/example.org;
}
}
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993305#p28993305:3c7es12h said:mmiller7[/url]":3c7es12h]
* Obtain more money
* Purchase SSL cert
HTTPS is not just about snooping, it's also a security issue. Since your site is not using SSL, anybody who visits your website can be attacked.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993305#p28993305:1wduccwa said:mmiller7[/url]":1wduccwa]You forgot a few steps...[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:1wduccwa said:MartinHatch[/url]":1wduccwa]Seems like an awful lot of work.
My IIS site it was a case of:
* Install SSL cert
* Configure site bindings
* Setup URL Rewrites
the last step simply performs a 302-permanent redirect to anyone trying to use normal HTTP
* Obtain more money
* Purchase SSL cert
* Figure out how to open the stupid IPTABLES and make it stick
Personally, I still don't see why *everything* would need to be HTTPS. I rent a very-low-end server to run a personal hobby photo album site. I'm really not concerned if someone snoops on the non-interactive flow of pictures. Nor am I worried about the speedtest.net mini-site having the random data snooped.
HTTPS sounds like a great way to bring an underspec'd server to it's knees with a fraction of the traffic. Yes, if you have accounts and logins or personal info it absolutely needs HTTPS. That doesn't mean *EVERYTHING* should be.
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993335#p28993335:k5krljpx said:Abhi Beckert[/url]":k5krljpx]HTTPS is not just about snooping, it's also a security issue. Since your site is not using SSL, anybody who visits your website can be attacked.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993305#p28993305:k5krljpx said:mmiller7[/url]":k5krljpx]You forgot a few steps...[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:k5krljpx said:MartinHatch[/url]":k5krljpx]Seems like an awful lot of work.
My IIS site it was a case of:
* Install SSL cert
* Configure site bindings
* Setup URL Rewrites
the last step simply performs a 302-permanent redirect to anyone trying to use normal HTTP
* Obtain more money
* Purchase SSL cert
* Figure out how to open the stupid IPTABLES and make it stick
Personally, I still don't see why *everything* would need to be HTTPS. I rent a very-low-end server to run a personal hobby photo album site. I'm really not concerned if someone snoops on the non-interactive flow of pictures. Nor am I worried about the speedtest.net mini-site having the random data snooped.
HTTPS sounds like a great way to bring an underspec'd server to it's knees with a fraction of the traffic. Yes, if you have accounts and logins or personal info it absolutely needs HTTPS. That doesn't mean *EVERYTHING* should be.
The thing is, SSL isn't about protecting the server operator, it is about protecting ordinary people browsing the internet.
Also, SSL does not bring an underspec'd server to it's knees. I'm guessing your CPU load will increase from 99.999% idle to 99.998% idle if you enabled SSL.
SSL is only expensive if you have a massively complicated server setup like facebook or youtube. For small sites it's free, except for learning how to implement it.
…which is also something that nginx can do, if you should choose to configure it that way See the proxy_cache_* directives.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993303#p28993303:3bc88xry said:woegjiub[/url]":3bc88xry]It's just as simple for that with nginx as well, if you're going with straight nginx.
The main gain here is using a caching layer.
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:2tj03jd6 said:MartinHatch[/url]":2tj03jd6]Seems like an awful lot of work.
My IIS site it was a case of:
* Install SSL cert
* Configure site bindings
* Setup URL Rewrites
the last step simply performs a 302-permanent redirect to anyone trying to use normal HTTP
StartSSL issues non-commercial-use certificates for free, but even then they make you pay to revoke or reissue certificates. This creates some strange incentives.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993313#p28993313:2qnuub5l said:Middling[/url]":2qnuub5l]StartSSL have provided free SSL certificates for the better part of a decade.
This tells HAProxy that if an incoming request is not HTTPS, to send a 301 redirect for the same resource with the HTTPS scheme instead of HTTPS.
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:ndhenmdf said:MartinHatch[/url]":ndhenmdf]the last step simply performs a 302-permanent redirect to anyone trying to use normal HTTP
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993177#p28993177:2eqwmvyl said:bthylafh[/url]":2eqwmvyl]In before the nth iteration of WHY ISN'T ARS HTTPS WHARRGARBL.
I am going to play that every time I read an article with more than 40 comments.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993447#p28993447:32odd3lc said:giltwist[/url]":32odd3lc][url=http://meincmagazine.com/civis/viewtopic.php?p=28993177#p28993177:32odd3lc said:bthylafh[/url]":32odd3lc]In before the nth iteration of WHY ISN'T ARS HTTPS WHARRGARBL.
That's not satire...THIS is satire...
![]()
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993525#p28993525:8alj01g6 said:peragrin[/url]":8alj01g6]
I am going to play that every time I read an article with more than 40 comments.
Yeah, I don't get that. HAProxy is not an SSL terminator (just because you can it doesn't mean you should), and the other servers do a much better job of it. Seems like unnecessary overhead to me. Also, for what it's worth, most people won't need a proxy (let alone two) on their personal site. So the simple nginx config above works fine (my HTTP->HTTPS config is the same lines).[url=http://meincmagazine.com/civis/viewtopic.php?p=28993313#p28993313:11c9bhcg said:Middling[/url]":11c9bhcg]
If the author wasn't using HAProxy and Varnish for caching it would be fairly easy to do in Nginx too.
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993207#p28993207:11c9bhcg said:MartinHatch[/url]":11c9bhcg][url=http://meincmagazine.com/civis/viewtopic.php?p=28993177#p28993177:11c9bhcg said:bthylafh[/url]":11c9bhcg]In before the nth iteration of WHY ISN'T ARS HTTPS WHARRGARBL.
It is in HTTPS for subscribers![]()
Yes.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993691#p28993691:11c9bhcg said:drosboro[/url]":11c9bhcg]Lee, is a “subscriptor” someone who uses a lot of subscripts?
No he isn't... he's early. It's just that the internet connection for his personal blog is running through a time/space warp, so he's actually interacting with us from the past![url=http://meincmagazine.com/civis/viewtopic.php?p=28993275#p28993275:2x1itvk1 said:burne_[/url]":2x1itvk1]Lee: you're a little late, actually. Had to find out the same a few months ago. If you borrowed my notes you could have saved yourself a lot of time..
Care to point me to a free way of getting the certificate? When I've followed guides for self-issued certs everyone is scared away by the "this isn't trusted" warnings.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993335#p28993335:f8ingzxk said:Abhi Beckert[/url]":f8ingzxk]HTTPS is not just about snooping, it's also a security issue. Since your site is not using SSL, anybody who visits your website can be attacked.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993305#p28993305:f8ingzxk said:mmiller7[/url]":f8ingzxk]You forgot a few steps...[url=http://meincmagazine.com/civis/viewtopic.php?p=28993217#p28993217:f8ingzxk said:MartinHatch[/url]":f8ingzxk]Seems like an awful lot of work.
My IIS site it was a case of:
* Install SSL cert
* Configure site bindings
* Setup URL Rewrites
the last step simply performs a 302-permanent redirect to anyone trying to use normal HTTP
* Obtain more money
* Purchase SSL cert
* Figure out how to open the stupid IPTABLES and make it stick
Personally, I still don't see why *everything* would need to be HTTPS. I rent a very-low-end server to run a personal hobby photo album site. I'm really not concerned if someone snoops on the non-interactive flow of pictures. Nor am I worried about the speedtest.net mini-site having the random data snooped.
HTTPS sounds like a great way to bring an underspec'd server to it's knees with a fraction of the traffic. Yes, if you have accounts and logins or personal info it absolutely needs HTTPS. That doesn't mean *EVERYTHING* should be.
The thing is, SSL isn't about protecting the server operator, it is about protecting ordinary people browsing the internet.
Also, SSL does not bring an underspec'd server to it's knees. I'm guessing your CPU load will increase from 99.999% idle to 99.998% idle if you enabled SSL. It's your bandwidth or disk activity or available RAM that matter on a low spec server, and encryption does nothing to make any of those work harder.
SSL is only expensive if you have a massively complicated server setup like facebook or youtube. For small sites it's free, except for learning how to implement it.
I'd love to, but it's a terrifying and scary prospect, honestly. I've looked at approaching it a few different ways and I still don't fully understand the best way for me to do it at home; it's something I'd want to understand fully and actually do & document before I try writing about it. So...maybe someday, but not yet.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993905#p28993905:1dc8eyjj said:Jeff S[/url]":1dc8eyjj]I would like to make a recommendation for an additional article for this server: Making your webserver work over IPv6.
Sure—with this, especially, there are multiple tools for the job.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993877#p28993877:1dc8eyjj said:chrisnehren[/url]":1dc8eyjj]
Yeah, I don't get that. HAProxy is not an SSL terminator (just because you can it doesn't mean you should), and the other servers do a much better job of it. Seems like unnecessary overhead to me. Also, for what it's worth, most people won't need a proxy (let alone two) on their personal site. So the simple nginx config above works fine (my HTTP->HTTPS config is the same lines).
[url=http://meincmagazine.com/civis/viewtopic.php?p=28994333#p28994333:320wqwtp said:Whiner42[/url]":320wqwtp]I do object to the moral language though: "It's the right thing to do" ? Shades of Wilford Brimley and Quaker Oats!
[url=http://meincmagazine.com/civis/viewtopic.php?p=28994335#p28994335:320wqwtp said:GreggN[/url]":320wqwtp]I still oppose the idea that ALL sites need to be HTTPS. Even if you go through the effort of getting a free certificate, you still have to go through the work of installing a new certificate every year. We have dozens of servers that go months without being touched....
Digital Ocean - $5 / month VPS, $6 if you enable backups on the droplet.[url=http://meincmagazine.com/civis/viewtopic.php?p=28993343#p28993343:3i137zi2 said:Katana314[/url]":3i137zi2]Pretty much stopped reading at the "prerequisites" part, for a reason I already knew; my host is a shared host. It costs about $6 a month, and I can't justify doubling/tripling those costs to prevent the NSA from seeing it. It's sad that for that reason alone I'm going to be at the bottom of the newfangled Google search result rankings, but such is life.
I get how awesome HTTPS is, but sometimes I feel like the browser developers aren't actually aware of *why* all sites haven't implemented it straight away.
Personally, I still don't see why *everything* would need to be HTTPS.
At the same time we’re going to start participating in HSTS—that’s "HTTP Strict Transport Security," a way to ensure that your site communicates to your visitors that not only do you support HTTPS, but that you insist on it.
[url=http://meincmagazine.com/civis/viewtopic.php?p=28993177#p28993177:354659e1 said:bthylafh[/url]":354659e1]In before the nth iteration of WHY ISN'T ARS HTTPS WHARRGARBL.