您的位置:首页 > 运维架构 > Nginx

Nginx的虚拟主机配置文件

2014-04-05 21:41 591 查看
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;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息