Skip to content

Commit

Permalink
Fixed prod vhost files expires headers to be in the block they are re…
Browse files Browse the repository at this point in the history
…quired. Updated vagrantfile to allow latest version of docker and docker-compose
  • Loading branch information
zakhenry committed Jan 13, 2016
1 parent 36471a1 commit 66e1519
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Vagrant.configure(2) do |config|
# provision apt update
config.vm.provision :shell, inline: "apt-get update"
# provision with docker
config.vm.provision :docker, version: "1.6.2"
config.vm.provision :docker_compose, compose_version: "1.3.1"
config.vm.provision :docker
config.vm.provision :docker_compose, project_name: "spira"

# Provision the box with boostrap file
config.vm.provision :shell, path: "vagrant/bootstrap.sh"
Expand Down
17 changes: 3 additions & 14 deletions vhosts/nginx/production/spira-app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ server {
access_log %DATA_ROOT%/logs/access-app.log;
error_log %DATA_ROOT%/logs/error-app.log warn;

# allow the source files to be read by the browser for sourcemapping
location %DATA_ROOT%/app/src {
root /;
try_files $uri $uri/ =404;
}

location / {
root %DATA_ROOT%/app/build;
index index.html;
try_files $uri $uri/ /index.html =404;
expires max;
add_header Pragma public;
add_header Cache-Control "public";
}

location /api/ {
Expand All @@ -27,7 +24,6 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
port_in_redirect off;
#proxy_redirect http://127.0.0.1:8080 /api;
proxy_connect_timeout 300;
}

Expand All @@ -41,13 +37,6 @@ server {
proxy_connect_timeout 300;
}

location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public";
}


location ~ /\.ht {
deny all;
}
Expand Down
9 changes: 3 additions & 6 deletions vhosts/nginx/production/spira-forum.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ server {

location / {
try_files $uri $uri/ @forum;
expires max;
add_header Pragma public;
add_header Cache-Control "public";
}

location @forum {
Expand All @@ -24,12 +27,6 @@ server {
fastcgi_param SCRIPT_FILENAME $request_filename;
}

location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public";
}

location ~ /\.ht {
deny all;
}
Expand Down

0 comments on commit 66e1519

Please sign in to comment.