Nginx的虚拟主机配置文件
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;
}
}
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;
}
}
none