具体安装过程见参考博文注9、Heartbeat+DRBD+MySQL高可用架构方案与实施。一般文件名为mysql-5.5.24.tar.gz这种方式。
一般文件名为mysql-5.5.32-linux2.6-x89_64.tar.gz这种方式。
必须在安装完MySQL(make install)后,进行数据库初始化操作。
编译原码时,只须到make install结束即可,二进制方式时,解压后就可以了。实际上就是只需装好客户端,供安装PHP时好调用MySQL生成PHP调用MySQL的函数。
groupadd mysql
useradd mysql –g mysql –M –s/sbin/nologin
说明:mysql是一个虚拟用户,不创建家目录,不让登陆
tar zxf tar xfmysql-5.5.32-linux2.6-x86_64.tar.gz
a、查看已安装的mysql包和路径
rpm -qa | grep -i mysql
find / -name mysql
whereis mysql
b、删除已安装包
rpm -ev --nodeps mysql-server-5.1.71-1.el6.x86_64
rpm -ev --nodeps mysql-bench-5.1.71-1.el6.x86_64
rpm -ev --nodeps mysql-devel-5.1.71-1.el6.x86_64
rpm -ev --nodeps mysql-5.1.71-1.el6.x86_64
c、删除已安装目录
rm -fr /var/lib/mysql
rm -fr /usr/lib64/mysql
rm -fr /usr/share/mysql /usr/bin/mysql/usr/lib/mysql /usr/include/mysql
d、查看是否删除干净
rpm -qa | grep -i mysql
whereis mysql
find / -name mysql
cp -fr mysql-5.5.32-linux2.6-x86_64 /application/mysql-5.5.32
ln -s /application/mysql-5.5.32//application/mysql
chown -R mysql.mysql /application/mysql/data/
./scripts/mysql_install_db --user=mysql--basedir=/application/mysql/ --datadir=/application/mysql/data/
cp support-files/mysql.server/etc/init.d/mysqld
vi /etc/init.d/mysqld
basedir=/application/mysql/
datadir=/application/mysql/data
cp support-files/my-small.cnf /etc/my.cnf
/etc/init.d/mysqld start
/application/mysql/bin/mysqladmin -uroot password '123456';
a、方法一:设置/etc/profile
vi /etc/profile
export PATH=/application/mysql/bin/:/application/nginx/sbin/:$PATH
b、方法二:拷贝相关命令到PATH所在路径下
cp /application/mysql/bin/mysqld/usr/local/bin/
错误日志在/application/mysql/data/下的
cat myLinuxStudy.err
select user,host from mysql.user;
+------+--------------+
| user | host |
+------+--------------+
| root | 127.0.0.1 |
| root | ::1 |
| | localhost |
| root | localhost |
| | myLinuxStudy |
| root | myLinuxStudy |
+------+--------------+
drop user 'root'@'::1';
drop user ''@myLinuxStudy;
drop user ''@localhost;
MySQL使用drop删除用户时,实际就是操作mysql.user表,所以可以用delete来删除mysql.user表中的记录来实现。
drop user ''@localhost;
ERROR 1396 (HY000): Operation DROP USERfailed for ''@'mylinuxstudy'
delete from mysql.user where user=''and host='myLinuxStudy';
Query OK, 1 row affected (0.00 sec)
a、报错提示
二进制包安装,执行scripts/mysql_install_db --user=mysql --datadir=/data/mysql/出现如下报错:
scripts/mysql_install_db:line 249: ./bin/my_print_defaults: cannot execute binary fileNeither host‘a.com‘ nor ‘localhost‘ could be looked up with./bin/resolveipPlease configurethe ‘hostname‘ command to return a correct hostname.If you want to solve thisat a later stage, restart this script with the --force option
b、原因
是32位的平台使用了64位的二进制包。
c、解决办法:
换版本,或非要安装,则只能使用源码编译安装。
a、报错提示
./bin/mysqld:error while loading shared libraries:libaio.so.1: cannot open shared objectfile: No such file or directory
b、原因
缺少libaio库文件
c、解决办法:查找libaio相关rpm安装所需的包
yum install libaio libaio-devel
a、报错提示
启动MySql提示:The serverquit without updating PID file(…)失败
b1、原因1:初始化数据库有问题
c1、解决办法:重新初始化数据库
b2、原因2:启动时用了不同的程序来启启动。(/etc/init.d/mysqldstart和mysqld_safe交叉启动)
c2、解决办法:不要交叉使用相关启动命令
b3、可能是/usr/local/MySQL/data/rekfan.pid文件没有写的权限
c3、解决方法 :
给予权限,执行“chown -R mysql:mysql /var/data” “chmod -R 755/usr/local/mysql/data”然后重新启动mysqld!
b4、可能进程里已经存在mysql进程
c4、解决方法:
用命令“ps -ef|grep mysqld”查看是否有mysqld进程,如果有使用“kill -9 进程号”杀死,然后重新启动mysqld!
b5、可能是第二次在机器上安装mysql,有残余数据影响了服务的启动。
c5、解决方法:
去mysql的数据目录/data看看,如果存在mysql-bin.index,就赶快把它删除掉吧,它就是罪魁祸首了。
b6、mysql在启动时没有指定配置文件时会使用/etc/my.cnf配置文件
c6、解决方法:
打开这个文件查看在[mysqld]节下有没有指定数据目录(datadir)。请在[mysqld]下设置这一行:datadir = /usr/local/mysql/data
b7、skip-federated字段问题
c7、解决方法:
检查一下/etc/my.cnf文件中有没有没被注释掉的skip-federated字段,如果有就立即注释掉吧。
b8、错误日志目录不存在
c8、解决方法:
使用“chown” “chmod”命令赋予mysql所有者及权限
b9、selinux惹的祸,如果是centos系统,默认会开启selinux
c9、解决方法:
关闭它,打开/etc/selinux/config,把SELINUX=enforcing改为SELINUX=disabled后存盘退出重启机器试试。
a、报错提示
ERROR 1045 (28000): Access deniedfor user 'usera'@'localhost' (using password:YES)
无论怎么处理,就是始终无法登入mysql
b、原因
初始化MySQL数据库时不正常,因为初始化MySQL数据库是会生成一系列系统表,如果这步不正常,发生任何报错,都不奇怪。
c、解决方法
清空data目录下所有内容:rm -fr /application/mysql/data/
重新初始化数据库:
./scripts/mysql_install_db --user=mysql--basedir=/application/mysql/ --datadir=/application/mysql/data/
LAMP:以模块的方式工作,在Apache中生成libphp5.so,
LNMP:以进程的方式工作,以FCGI方式,启进程(php-fpm)和端口(9000)
rpm -qa|grep -E"zlib|libxml|libjpeg|freetype|libpng|gd|curl|libiconv|zlib-devel
|libxml2-devel|libjpeg-devel|freetype-devel|libpng-devel|gd-devel|curl-devel"
tar xf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure
make
make install
/sbin/ldconfig
cd /wddg/tools/libmcrypt-2.5.8
cd libltdl/
./configure --enable-ltdl-install
make
make install
tar -xf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure LD_LIBRARY_PATH=/usr/local/lib
make
make install
rm –f /usr/lib/libmcrypt.*
rm –f /usr/lib/libmhash*
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
tar xf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8
/sbin/ldconfig
./configure
make
make install
rpm -qa | grep libxslt
libxslt-devel-1.1.26-2.el6_3.1.x86_64
libxslt-1.1.26-2.el6_3.1.x86_64
tar xf php-5.3.27.tar.gz
./configure \
--prefix=/application/php5.3.27 \
--with-mysql=/application/mysql \
--with-iconv-dir=/usr/local/libiconv \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir \
--with-libxml-dir=/usr \
--enable-xml \
--disable-rpath \
--enable-safe-mode \
--enable-bcmath \
--enable-shmop \
--enable-sysvshm \
--enable-inline-optimization \
--with-curl \
--with-curlwrappers \
--enable-mbregex \
--enable-fpm \
--enable-mbstring \
--with-mcrypt \
--with-gd \
--enable-gd-native-ttf \
--with-openssl \
--with-mhash \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--enable-short-tags \
--enable-zend-multibyte \
--enable-static \
--with-xsl \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--enable-ftp
make
/php-5.3.27/sapi/cli/php: error while loading shared libraries:libmysqlclient.so.18: cannot open shared object file: No such file or directory
make: *** [ext/phar/phar.php] Error 127
a、方法一
(i)查找文件libmysqlclient.so.18,发现在mysql的lib目录下
find / -name "libmysqlclient.so.18"
/application/mysql-5.5.32/lib/libmysqlclient.so.18
(ii)将mysql的lib目录写入/etc/ld.so.conf
echo "/application/mysql-5.5.32/lib" >>/etc/ld.so.conf
(iii)重新加载/etc/ld.so.conf,让其生效
ldconfig
(iv)再次make,又报错:无法访问ext/phar/phar.phar:没有那个文件或目录
chmod: cannot access `ext/phar/phar.phar': No such file or directory
(v)手动创建该目录
mkdir -p ext/phar/phar.phar
b、方法二
创建libmysqlclient.so.18的软连接到/usr/lib64(非64位,则为/usr/lib/)
ln -s /application/mysql-5.5.32/lib/libmysqlclient.so.18 /usr/lib64/
make
make install
ln -s /application/php5.3.27/ /application/php
cd /wddg/tools/php-5.3.27
ll php.ini-*
-rw-r--r-- 1 101 101 69606 Jul 11 2013 php.ini-development
-rw-r--r-- 1 101 101 69627 Jul 11 2013 php.ini-production
php.ini-development:开发测试时使用,打开错误输出
php.ini-production:正式环境中使用,关闭错误输出
cp php.ini-production /application/php/lib/php.ini
cd /application/php/etc
cp php-fpm.conf.default php-fpm.conf
修改前:;pid = run/php-fpm.pid
修改后:pid = /application/php/logs/php-fpm.pid
修改前:;error_log = log/php-fpm.log
修改后:error_log =/application/php/logs/php-fpm.log
修改前:;log_level = notice
修改后:log_level = error
修改前:;rlimit_files = 1024
修改后:rlimit_files = 32768
修改前:;listen.owner = nginx
;listen.group = nginx
修改后:listen.owner = nginx
listen.group = nginx
修改前:pm.max_children = 5
修改后:pm.max_children = 1024
修改前:pm.start_servers = 2
修改后:pm.start_servers = 16
修改前:pm.min_spare_servers = 1
修改后:pm.min_spare_servers = 5
修改前:pm.max_spare_servers = 3
修改后:pm.max_spare_servers = 20
修改前:;pm.process_idle_timeout = 10s;
修改后:pm.process_idle_timeout = 15s;
修改前:;pm.max_requests = 500
修改后:pm.max_requests = 2048
修改前:;slowlog = log/$pool.log.slow
修改后:slowlog = /application/php/logs/$pool.log.slow
修改前:;request_slowlog_timeout = 0
修改后:request_slowlog_timeout = 10
vimdiff php-fpm.conf.default php-fpm.conf
/application/php/sbin/php-fpm -t
NOTICE: configuration file/application/php5.3.27/etc/php-fpm.conf test is successful
/application/php/sbin/php-fpm
netstat -lntup | grep php-fpm
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 19112/php-fpm
ps -ef | grep php-fpm
root 19112 1 0 12:40 ? 00:00:00 php-fpm: master process(/application/php5.3.27/etc/php-fpm.conf)
nginx 19113 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19114 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19115 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19116 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19117 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19118 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19119 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19120 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19121 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19122 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19123 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19124 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19125 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19126 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19127 19112 0 12:40 ? 00:00:00 php-fpm: pool www
nginx 19128 19112 0 12:40 ? 00:00:00 php-fpm: pool www
vi /etc/rc.local
/etc/init.d/mysqld start
/application/php/sbin/php-fpm
/application//nginx/sbin/nginx
按照程序的架构,开启服务时,一般从后向前启;停止服务时,一般从前往后停。
vi nginx.conf
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 192.168.93.148:80;
server_name www.abc.org;
root html/www;
index index.html index.htm;
}
}
从nginx.conf.default文件中将涉及php的部分拷贝过来(坑),同时修改php处理时的根路径:
将root html改为root html/www。
vi nginx.conf
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 192.168.93.148:80;
server_name www.abc.org;
root html/www;
index index.html index.htm;
#location~ \.php$ {
# root html/www;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
}
}
a、查看nginx.conf文件的行数
cat -n nginx.conf
b、查看nginx.conf中含“#”号的内容
sed -n '15,21p' nginx.conf
c、过滤nginx.conf中的“#”号
sed -e '15,21s/#//g' nginx.conf
d、确认无误后,将修改内容写入nginx.conf文件中
sed -i '15,21s/#//g' nginx.conf
cat nginx.conf
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 192.168.93.148:80;
server_name www.abc.org;
root html/www;
index index.html index.htm;
location ~ \.php$ {
root html/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
}
}
/application/nginx/sbin/nginx -t
/application/nginx/sbin/nginx -s reload
http://www.abc.org/phpinfo.php
vi nginx.conf
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 192.168.93.148:80;
server_name www.abc.org;
root html/www;
index index.html index.htm;
location ~ .*\.(php|php5)?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
}
vi /application/nginx/html/www/mysql.php
$link_id=mysql_connect('localhost','root','123456') or mysql_error();
if($link_id){
echo "mysqlsuccessful by aaa";
}else{
echo mysql_error();
}
?>
显示:mysql successful by aaa
/application/php/bin/php /application/nginx/html/www/mysql.php
mysql successful by aaa
create database wiki;
grant all on wiki.* to wiki@'localhost' identified by 'wiki';
select user,host from mysql.user;
+------+---------------+
| user | host |
+------+---------------+
| root | 127.0.0.1 |
| root | localhost |
| wiki | localhost |
| root | xztLinuxStudy |
+------+---------------+
flush privileges;
mkdir /application/nginx/conf/extra -p
vi /application/nginx/conf/extra/wiki.conf
server {
listen 192.168.93.148:8000;
server_name www.wiki.org;
root html/wiki;
index index.php index.html index.htm;
location ~.*\.(php|php5)?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
vi nginx.conf
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 192.168.93.148:80;
server_name www.abc.org;
root html/www;
index index.html index.htm;
location ~.*\.(php|php5)?$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
}
include extra/wiki.conf;
}
/application/nginx/sbin/nginx -t
/application/nginx/sbin/nginx -s reload
192.168.188.218 www.abc.org bbs.abc.org blog.abc.org www.wiki.org
wget http://kaiyuan.hudong.com/download.php?n=HDWiki-v5.1GBK-20141205.zip
unzip unzip HDWiki-v5.1GBK-20141205.zip
cd HDWiki-v5.1GBK-20121102/
cd hdwiki/
mv * /application/nginx/html/wiki/
chown -R nginx.nginx /application/nginx/html/wiki/
http://www.wiki.org:8000/
http://192.168.93.148:8000/
如果,最下面的相关目录当前状态为不可用时,需操作上面的第12步,更改html/wiki目录下文件权限。更改后重新刷新页面即可。
数据库服务器:localhost
数据库用户名:wiki
数据库密码:wiki
数据库名:wiki
表名前缀:wiki_ #最好改掉,易被攻击。
管理员昵称:abcdefg
管理员Email地址:[email protected]
管理员密码:123456
确认密码:123456
mysql -uroot -p
use wiki
show tables;
cd /application/nginx/html/wiki
rm -fr install/ 或 mv install/install.phpinstall/installbak.bak
IP |
用途 |
域名 |
首页内容 |
192.168.93.85 |
负载均衡 |
http://www.lb.org/ |
|
192.168.93.148 |
节点1-Nginx |
http://www.abc.org/index.html |
www.nginx.org |
192.168.93.238 |
节点2-Apache |
http://www.apache.org/ index.html |
www.apache.org |
cd /application/nginx/
grep -Ev '#|^$' nginx.conf.default > nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream backend {
server 192.168.93.148:80 max_fails=3fail_timeout=30s;
server 192.168.93.238:80 max_fails=3fail_timeout=30s;
}
server {
listen 80;
server_name www.lb.org;
index index.html index.htm;
location / {
proxy_pass http://backend;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
http://192.168.93.85/ 或 http://www.lb.org/
第一次:www.nginx.org
第二次:www.apache.org
第三次:www.nginx.org
第四次:www.apache.org
第五次:www.nginx.org
第六次:www.apache.org
for n in `seq 100`;do curl 192.168.93.85;sleep 2;done
www.apache.org
www.nginx.org
www.apache.org
www.nginx.org
www.apache.org
www.nginx.org
www.apache.org
www.nginx.org
...
a、使用脚本测试:访问100次负载均衡服务器
for n in `seq 100`;do curl 192.168.93.85;sleep 2;done
www.apache.org
www.nginx.org
www.apache.org
www.nginx.org
www.apache.org
www.nginx.org
www.apache.org
www.nginx.org
b、访问到第10次时,关闭节点2-Apache上的Apache服务
killall httpd
www.nginx.org
www.apache.org
www.nginx.org
www.nginx.org
www.nginx.org
www.nginx.org
www.nginx.org
...
c、访问到第20次时,关闭节点1-Nginx上的Nginx服务
killall nginx
...
Sorry, the page you are looking for is currentlyunavailable.
Please try again later.
...
d、访问到第30次时,启动节点2-Apache上的Apache服务
/application/apache/bin/apachectl start
www.apache.org
www.apache.org
www.apache.org
www.apache.org
www.apache.org
...
e、访问到第40次时,启动节点1-Nginx上的Nginx服务
/application/nginx/sbin/nginx
www.apache.org
www.apache.org
www.apache.org
www.apache.org
www.apache.org
www.apache.org
www.nginx.org
...
f、小结
上述操作表明,Nginx的负载均衡有健康检查功能,可以探测服务节点是否正常提供服务。
由于Nginx的负载均衡默认采用轮询策略:RR(RoundRobin),所以当存在用户登陆访问时,有可能在用户登陆后,将用户请求分配到其它服务器上,由于该服务器没有Session,导致认为用户没有登陆,要求用户重新登陆的问题。这时,可以指定Nginx 的负载均衡策略为ip_hash,让每个请求按访问IP的hash结果分配,这样每个访客钭固定访问一个后端节点服务器,可以有效解决Session的问题。ip_hash要求nginx一定要是最前端的服务器,否则Nginx得不到正确的IP,这时分流是错乱的。ip_hash的缺点是会造成负载不均。用户会话一般保存在服务器的/tmp目录下。
vi /application/nginx/conf/nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream backend {
ip_hash;
server 192.168.93.148:80max_fails=3 fail_timeout=30s;
server 192.168.93.238:80max_fails=3 fail_timeout=30s;
}
server {
listen 80;
server_name www.lb.org;
index index.html index.htm;
location / {
proxy_passhttp://backend;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
for n in `seq 100`;do curl 192.168.93.85;sleep 2;done
www.apache.org
www.apache.org
www.apache.org
www.apache.org
。。。
由于轮询RR策略无法解决Session保持,ip_hash又可能造成后台服务器负载不均,所在在生产环境中一般是在所有节点服务器之外搭建缓存服务器,来保存Session会话信息。缓存服务器使用的软件一般是Memcached、Redis、Nosql等。集群架构多服务器同步Session的主要方式:
LVS:lvs -p
Nginx:ip_hash
Haproxy:cookie insert
服务器192.168.93.238上,有三台虚拟主机:www.apache.org bbs.apache.orgblog.apache.org
http://www.apache.org/
http://blog.apache.org/
http://bbs.apache.org/
vi /application/nginx/conf/nginx.conf
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream backend {
server 192.168.93.148:80max_fails=3 fail_timeout=30s;
server 192.168.93.238:80max_fails=3 fail_timeout=30s;
}
server {
listen 80;
server_name www.lb.org;
index index.html index.htm;
location / {
proxy_passhttp://backend;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
server_name bbs.lb.org;
index index.html index.htm;
location / {
proxy_pass http://backend;
proxy_set_headerHost $host;
proxy_set_headerX-Forwarded-For $remote_addr;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
http://bbs.lb.org