server {
listen 80;
server_name xxx.com;
#charset koi8-r;
root /usr/laravel/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
index index.html index.htm index.php;
expires 1h;
add_header Cache-Control max-age=180;
}
location ~ \.php$ {
add_header Cache-Control "no-cache, no-store, max-age=0, must-revalidate";
add_header Pragma no-cache;
fastcgi_pass unix:/var/run/www/php-cgi.sock; # 此处配置自己设置的php-cgi.sock的位置
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
网友评论