Created
October 25, 2013 14:18
Revisions
-
lukearmstrong created this gist
Oct 25, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ server { listen 80; server_name .example.co.uk.dev; access_log /usr/local/var/log/nginx/example.co.uk-access.log; error_log /usr/local/var/log/nginx/example.co.uk-error.log error; root /var/www/example.co.uk/public; index index.php index.html; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php { fastcgi_index index.php; fastcgi_pass unix:/usr/local/var/run/php-fpm.socket; include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } # Prevents caching of css/less/js/images, only use this in development location ~* \.(css|less|js|jpg|png|gif)$ { add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; expires 0; } }