Skip to content

Commit

Permalink
Change nginx config
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur committed Oct 10, 2016
1 parent 9b76fc1 commit bdb6e23
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y \

git clone https://github.com/svenvandescheur/svenv.nl.git /srv/nginx && \
cd /srv/nginx && \
npm install --production && \
pip install -r requirements.txt && \

cd /srv/nginx/svenv/ && \
Expand Down
20 changes: 18 additions & 2 deletions files/etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ server {
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_dhparam /etc/ssl/certs/dhparams.pem;

location /jspm_packages {
root /srv/nginx/;
location /humans.txt {
root /srv/nginx/svenv/;

expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}

location /robots.txt {
root /srv/nginx/svenv/;

expires 30d;
add_header Pragma public;
Expand All @@ -62,6 +70,14 @@ server {
add_header Cache-Control "public";
}

location /node_modules {
root /srv/nginx/svenv/;

expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}

location / {
uwsgi_pass django;
uwsgi_param QUERY_STRING $query_string;
Expand Down

0 comments on commit bdb6e23

Please sign in to comment.