| 33 | The key Nginx config differences from the live site are these env vars: |
| 34 | |
| 35 | {{{ |
| 36 | fastcgi_param SITE_ENV crin_dev; |
| 37 | |
| 38 | fastcgi_param SITE_ENV crin_stage; |
| 39 | }}} |
| 40 | |
| 41 | That a different `robots.txt` file is served to prevent the sites form being indexed: |
| 42 | |
| 43 | {{{ |
| 44 | location = /robots.txt { |
| 45 | root /var/www/html; |
| 46 | } |
| 47 | }}} |
| 48 | |
| 49 | And if files are not found locally in `/sites/default/files` then they are reverse proxied off the live server as there isn't room for a full copy of these files: |
| 50 | |
| 51 | {{{ |
| 52 | location /sites/default/files { |
| 53 | try_files $uri @proxy_to_live; |
| 54 | } |
| 55 | location @proxy_to_live { |
| 56 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 57 | proxy_set_header Host $http_host; |
| 58 | proxy_redirect off; |
| 59 | proxy_pass http://www.crin.org$uri; |
| 60 | } |
| 61 | }}} |