安装phpredisadmin linux nginx服务器下

时间:2021-12-22 12:21:14

1.下载phpRedisAdmin:git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git

2.cd phpRedisAdmin   git submodule init   git submodule init

3.mv phpRedisAdmin/ /home/www

4.composer install

5.cp includes/config.sample.inc.php includes/config.inc.php

6.vim config.inc.php更改其中配置

7.ngnix.conf下include一个单独文件写上如下代码然后重启:

server {
listen 8080;
server_name localhost;
root /home/www/phpRedisAdmin;
access_log /home/log/phpRedisAdmin.access.log main; fastcgi_connect_timeout 300;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k; location / {
index index.html index.htm index.php;
concat on;
concat_max_files 20;
concat_delimiter "\n";
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
access_log off;
log_not_found on;
}
location ~ .*\.(js|css)?$
{
expires 12h;
access_log off;
log_not_found on;
}
location = /favicon.ico {
log_not_found off;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /nginx-status {
stub_status on;
access_log off;
}
}