Skip to content

Commit

Permalink
nginx: Enable HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
yukiisbored committed May 24, 2017
1 parent 85af168 commit fff04c3
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 5 deletions.
2 changes: 2 additions & 0 deletions nginx/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ services:
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx.conf.d:/etc/nginx/conf.d:ro
- /etc/ssl/private/coala.io:/etc/ssl/private/coala.io:ro
ports:
- 80:80
- 443:443
networks:
- outside
networks:
Expand Down
8 changes: 8 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,13 @@ http {
resolver 127.0.0.11 valid=300s;
resolver_timeout 30s;

ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;

ssl_certificate /etc/ssl/private/coala.io/cert.pem;
ssl_certificate_key /etc/ssl/private/coala.io/cert.key;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

include /etc/nginx/conf.d/*.conf;
}
1 change: 1 addition & 0 deletions nginx/nginx.conf.d/blog.coala.io.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
server {
listen 443 ssl;
server_name blog.coala.io;

location / {
Expand Down
2 changes: 1 addition & 1 deletion nginx/nginx.conf.d/coala.io.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 80;
listen 443 ssl;
server_name coala.io www.coala.io;

location / {
Expand Down
5 changes: 5 additions & 0 deletions nginx/nginx.conf.d/http_redir.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
server {
listen 80;

return 301 https://$host$request_uri;
}
1 change: 1 addition & 0 deletions nginx/nginx.conf.d/list.coala.io.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
server {
listen 443 ssl;
server_name list.coala.io;

location = / { return 301 https://list.coala.io/mailman; }
Expand Down
2 changes: 1 addition & 1 deletion nginx/nginx.conf.d/mumble.coala.io.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
listen 80;
listen 443 ssl;
server_name mumble.coala.io;

location / { return 302 mumble://mumble.coala.io/?version=1.2; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Default server for every "available" sub-domains or direct access.

server {
listen 80 default_server;
listen 443 ssl;
server_name solar.coala.io;

location / {
proxy_pass http://192.30.252.153;
Expand Down
1 change: 1 addition & 0 deletions nginx/nginx.conf.d/webservices.coala.io.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
server {
listen 443 ssl;
server_name webservices.coala.io;

location / {
Expand Down

0 comments on commit fff04c3

Please sign in to comment.