server {
listen 80;
server_name www.aldjflas.cn;
access_log /home/logs/bbs/access.log combined buffer=32k;
error_log /home/logs/bbs/error.log warn;
location / {
index index.html index.htm index.php;
root /data/www/wwwroot/bbs;
}
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|thumb) {
root /data/www/wwwroot/bbs;
access_log off;
expires 10d;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/dev/shm/php-fcgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /data/www/wwwroot/bbs$fastcgi_script_name;
}
}
本文出自 “Linux运维” 博客,请务必保留此出处http://2853725.blog.51cto.com/2843725/1390997
nginx禁止某个IP或者IP段访问站点的设置方法,布布扣,bubuko.com
原文:http://2853725.blog.51cto.com/2843725/1390994