diff --git a/default.conf b/default.conf index ac2f2ec..9c02997 100644 --- a/default.conf +++ b/default.conf @@ -2,7 +2,9 @@ server { listen 80; server_name localhost; - root /var/www/html/public; + root /var/www/html; + index index.php index.html; + index index.php; @@ -10,10 +12,20 @@ server { try_files $uri $uri/ /index.php?$query_string; } - location ~ \.php$ { - fastcgi_pass php-fpm:9001; # Use the service name - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - include fastcgi_params; + location ~ \.php { + fastcgi_index index.php; + fastcgi_pass unix:/var/run/php/php5.6-fpm.sock; + + 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; + } + + location ~* \.(css|less|js|jpg|png|gif)$ { + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + expires 0; } } \ No newline at end of file