Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #543 from hpcloud/T4-758-enable-tls-for-nginx
Browse files Browse the repository at this point in the history
T4-758 Enable TLS for nginx (UI web server)
  • Loading branch information
ongk committed Aug 11, 2016
2 parents 6a40fb0 + 901bc42 commit 85e4142
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
12 changes: 11 additions & 1 deletion ci/nginx.conf.HCP
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ http {

include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
keepalive_timeout 70;
proxy_read_timeout 200;
sendfile off;
tcp_nopush on;
Expand All @@ -33,8 +33,18 @@ http {
'' close;
}

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

server {
listen 80;
listen 443 ssl;

ssl_certificate /etc/secrets/console-cert;
ssl_certificate_key /etc/secrets/console-cert-key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;

client_max_body_size 50M;

location /pp/ {
Expand Down
6 changes: 6 additions & 0 deletions containers/nginx/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM nginx

RUN mkdir -p /etc/secrets/ && \
openssl req -batch -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/secrets/server.key -out /etc/secrets/server.crt && \
chmod 0600 /etc/secrets && \
chmod 0600 /etc/secrets/server.key && \
chmod 0600 /etc/secrets/server.crt

COPY ./conf/nginx.dev.conf /etc/nginx/nginx.conf

EXPOSE 80 443
Expand Down
12 changes: 11 additions & 1 deletion containers/nginx/conf/nginx.HCP.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ http {

include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
keepalive_timeout 70;
proxy_read_timeout 200;
sendfile off;
tcp_nopush on;
Expand All @@ -33,8 +33,18 @@ http {
'' close;
}

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

server {
listen 80;
listen 443 ssl;

ssl_certificate /etc/secrets/console-cert;
ssl_certificate_key /etc/secrets/console-cert-key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;

client_max_body_size 50M;

location /pp/ {
Expand Down
12 changes: 11 additions & 1 deletion containers/nginx/conf/nginx.dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ http {

include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
keepalive_timeout 70;
proxy_read_timeout 200;
sendfile off;
tcp_nopush on;
Expand All @@ -33,8 +33,18 @@ http {
'' close;
}

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

server {
listen 80;
listen 443 ssl;

ssl_certificate /etc/secrets/server.crt;
ssl_certificate_key /etc/secrets/server.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;

client_max_body_size 50M;

location /pp/ {
Expand Down

0 comments on commit 85e4142

Please sign in to comment.