Skip to content

Commit

Permalink
Config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur committed Oct 11, 2016
1 parent 6fa0c16 commit eba65bf
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions files/etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
uwsgi_cache_path /tmp/cache/ levels=1:2 keys_zone=cache:10m inactive=24h max_size=512m;
uwsgi_cache_path /tmp/cache/ levels=1:2 keys_zone=cache:24h inactive=24h max_size=512m;


upstream django {
Expand All @@ -8,6 +8,12 @@ upstream django {

server {
listen 80 default_server;
server_name svenv.nl www.svenv.nl;
return 301 https://svenv.nl$request_uri;
}


server {
listen 443 http2 ssl;
server_name www.svenv.nl;
return 301 https://svenv.nl$request_uri;
Expand All @@ -23,13 +29,13 @@ server {


server {
add_header X-Proxy-Cache $upstream_cache_status;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains;";

error_page 500 502 503 504 /50x.html;
listen 443 http2 ssl;
server_name localhost svenv.nl;

error_page 500 502 503 504 /50x.html;
add_header X-Proxy-Cache $upstream_cache_status;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains;";

ssl on;
ssl_certificate /etc/ssl/certs/svenv.nl.crt;
ssl_certificate_key /etc/ssl/certs/svenv.nl.key;
Expand Down Expand Up @@ -79,6 +85,8 @@ server {
}

location / {
uwsgi_cache cache;

uwsgi_pass django;
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
Expand Down

0 comments on commit eba65bf

Please sign in to comment.