本文整理自网络,侵删。
Invision Power Board (IPB)是一个论坛程序,基于php+MySQL. 虽然国内大部分都在用discuz,但是国外ipb的用户很多,今天贴出ipb的nginx配置文件。配置如下:
代码如下:
server {
access_log off;
error_log logs/bbs.jb51.net-error_log warn;
listen 80;
server_name bbs.jb51.net;
# static file configuration
location ~* .(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|js|css|wml|swf)$ {
root /data/site/bbs.jb51.net;
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# site configuration
location / {
root /data/site/bbs.jb51.net;
index index.php index.html index.htm;
# IPB configuration
try_files $uri $uri/ /index.php?q=$uri&$args;
}
# php-fpm configuration
location ~ .php$ {
root /data/site/bbs.jb51.net;
try_files $uri =404;
fastcgi_pass unix:/tmp/php5-fpm.sock;//修改成你自己的
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}
server {
access_log off;
error_log logs/bbs.jb51.net-error_log warn;
listen 80;
server_name bbs.jb51.net;
# static file configuration
location ~* .(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|js|css|wml|swf)$ {
root /data/site/bbs.jb51.net;
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
# site configuration
location / {
root /data/site/bbs.jb51.net;
index index.php index.html index.htm;
# IPB configuration
try_files $uri $uri/ /index.php?q=$uri&$args;
}
# php-fpm configuration
location ~ .php$ {
root /data/site/bbs.jb51.net;
try_files $uri =404;
fastcgi_pass unix:/tmp/php5-fpm.sock;//修改成你自己的
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 4k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
}
IPB名词解释:
IPB论坛全称为Invision Power Board(缩写为IPB或IP.Board),是世界上最著名的论坛程式之一,由PHP+MySQL架构,让你毫不费力地创建,管理和促进你的在线论坛,高级直观的,诸如多状态这样的功能允许你只关注于开发你的论坛,而不是被复杂的设置所困扰。
更多相关Discuz论坛的内容来自木庄网络博客
标签:Discuz论坛
相关阅读 >>
discuz! x2.5与ucenter通信失败常见症状及解决方法
php轻量级数据库操作类medoo增加、删除、修改、查询例子
百度官方推出的wordpress结构化数据插件百度sitemap
更多相关阅读请进入《Discuz论坛》频道 >>
相关推荐
评论
管理员已关闭评论功能...
- 欢迎访问木庄网络博客
- 可复制:代码框内的文字。
- 方法:Ctrl+C。