安装 cd/data/web/phpgitclonehttps://github.com/ssdb/phpssdbadmin 编辑 app/config/config.php: 'ssdb'=array('host'='127.0.0.1','port'='8888',), nginx 配置 server{listen80;server_namelocalhost;set$root_path'/data/web/php';root$root_path;index
安装
cd /data/web/php
git clone https://github.com/ssdb/phpssdbadmin
编辑 app/config/config.php:
'ssdb' => array(
'host' => '127.0.0.1',
'port' => '8888',
),
nginx 配置
server {
listen 80;
server_name localhost;
set $root_path '/data/web/php';
root $root_path;
index index.html index.htm index index.php;
allow 58.247.44.170;
deny all;
location /phpssdbadmin {
try_files $uri $uri/ /phpssdbadmin/index.php?$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* \.(source|ico|css|js|gif|jpe?g|png)$ {
expires 30d;
add_header Pragma public;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
php.ini 配置
short_open_tag 必须启用!
编辑 php.ini, 查找 short_open_tag, 如果没有, 则加入下面一行, 如果有, 修改为
short_open_tag = On
注意, 行的前面不要有分号或者其它字符!
重启服务:
service php-fpm restart
service nginx reload
浏览器打开: http://localhost/phpssdbadmin