直接上nginx配置:

 

server {
  listen 80;
  listen [::]:80;
  server_name task.nbfuli.cn;
  access_log /data/wwwlogs/task.nbfuli.cn_nginx.log combined;
  index index.html index.htm index.php;
  root /www/laravel-test/public;
  
  include /usr/local/nginx/conf/rewrite/laravel.conf;
  #error_page 404 /404.html;
  #error_page 502 /502.html;
  location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ {
    valid_referers none blocked *.nbfuli.cn task.nbfuli.cn;
    if ($invalid_referer) {
        return 403;
    }
  }
  location ~ [^/]\.php(/|$) {
    #fastcgi_pass remote_php_ip:9000;
    fastcgi_pass unix:/dev/shm/php-cgi.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
  }

  location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
    expires 30d;
    access_log off;
  }
  location ~ .*\.(js|css)?$ {
    expires 7d;
    access_log off;
  }
  location ~ /(\.user\.ini|\.ht|\.git|\.svn|\.project|LICENSE|README\.md) {
    deny all;
  }
  location /.well-known {
    allow all;
  }
}

所有用户都可以去薅羊毛,192元充值200元话费!先到先得!导航栏话费充值,正规可靠,快充慢充自由选择。
欧阳逸资源站 » laravel的nginx配置

发表评论