Comments (12)
This config posted by author works for me. Hope it helps.
from phpredmin.
@psokolov Does the problem still exist?
from phpredmin.
Hi, I still have a problem with my nginx setup.
Can you please tell me the rewrite I have to setup ?
Urls are like : index.php / Action_Name / info / 0 / 0 ? param = ...
thanks
from phpredmin.
i have the same problem
from phpredmin.
Here a idea (ongoing progress) nginx conf setup inside a already php-fpm server to serve at www.mydomain.com/phpredmin that worked for me:
## PHP Redis monitor
location ~ ^/phpredmin/(.+\.php.*)$ {
alias /var/www/phpredmin/public/$1;
index index.html index.php;
try_files $uri $uri/ /index.php?$args;
location ~ ^/phpredmin/.+\.(js|css|png|jpg|gif|bmp|swf|ico|pdf|mov|fla|mp4|3gp|zip|rar|7z)$ {
try_files $uri = 404;
access_log off;
expires 24h;
alias /var/www/phpredmin/public/$1;
}
location ~ ^/phpredmin/.+\.php.*$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
set $fsn /index.php;
if (-f $document_root$fastcgi_script_name){
set $fsn $fastcgi_script_name;
}
# php5-fpm:
fastcgi_pass unix:/var/run/phpfpm-xyz.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;
}
}
from phpredmin.
my solution is just replacing try_files $uri =404;
with try_files $fastcgi_script_name =404;
or you drop try_files
at all, or only the =404
part as @matinfo did.
from phpredmin.
Finally here my nginx config that work well to serve http://www.mydomain.com/phpredmin/
(note: the / at the end mandatory):
server {
name www.mydomain.com;
...
## PHP Redis monitor
location /phpredmin {
index index.php;
root /var/www/phpredmin;
try_files $uri $uri/ /index.php?$args;
location ~ ^/phpredmin/.+\.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
set $fsn /index.php;
if (-f $document_root$fastcgi_script_name) {
set $fsn $fastcgi_script_name;
}
# php5-fpm
fastcgi_pass unix:/var/tmp/phpfpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;
include fastcgi_params;
}
location ~ ^/phpredmin/(.+\.(js|css|png|jpg|gif|ico))$ {
access_log off;
expires 24h;
root /var/www/phpredmin;
try_files $uri =404;
}
}
}
Notice: to work the public
directory need symlinked to phpredmin
, like this:
- cd /var/www/phpredmin (here the cloned project repository)
- /var/www/phpredmin$ ln -s public phpredmin
from phpredmin.
Is this really necessary? I mean unless you really want a different url than www.example.com/phpredmin/public/index.php ?
I just threw it into the web root (as per the installation instruction) and it seems to work. Or what am I missing?
from phpredmin.
@matinfo hey i tried your script and it worked.. now, how can i modify it in in order that the application answers me when i digit www.mydomain.com instead of http://www.mydomain.com/phpredmin/?
Thank you!
from phpredmin.
@iFedix not sur with the project structure of phpredmin is possible.
Workaround add permanent redirection from / to /phpredmin.
rewrite ^(.*) http://www.domain.com/phpredmin/$1 permanent;
--
Or copy content of /public to /var/www/phpredmin and change some location like $path = '../'
in index.php
to $path = '.'
. Plus change location /phpredmin
to location /
.
Not tested!
from phpredmin.
@matinfo thank you! :D
from phpredmin.
What a mess! it took me a couple of hours to get this configured in ngninx... It makes no sense this piece of software to require so much configuration.
Anyway, @matinfo solution worked, but I had to remove the last bracket (location ~ ^/phpredmin/(.+.(js|css|png|jpg|gif|ico))$), otherwise CSS files wouldn't load.
from phpredmin.
Related Issues (20)
- Integrate into Laravel HOT 4
- Use relative paths for resources
- Make it available through composer HOT 7
- Failed inclusions when run via cmdline
- Latest build does not work in PHP7 HOT 4
- Stats shows wrong CPU usage HOT 2
- 500 internal error server php_value short_open_tag 1 HOT 3
- Redis admin not working HOT 6
- why not can show all keys HOT 2
- Get the following error when browsing the UI HOT 2
- Cannot change default password HOT 2
- where is the Admin Page HOT 1
- Should only enable flag when php is loaded HOT 1
- How to install phpRedisAdmin in cPanel
- Can't disable auth when using docker image HOT 5
- Using socket: no documentation and cannot make it work. HOT 2
- See my project about redis admin
- Automatic hashing password HOT 1
- How to put the cron script to work?
- XSS-Vulnerability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpredmin.