Help setting up phpMyAdmin in a jail

Status
Not open for further replies.

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I have FEMP setup in a FN11U2 jail
nginx version: nginx/1.12.1
mysql56-server-5.6.37
php56-5.6.31
I can access the welcome to nginx page at http://JailIP/index.html
I've installed phpMyAdmin pkg install phpmyadmin
I'm not sure if my nginx.conf is not pointing to the correct location for myphpadmin or what the issue is.
Running http://JailIP/phpmyadmin gives a 404 error in nginx.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231

NasKar

Guru
Joined
Jan 8, 2016
Messages
739

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Is that where it's installed?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Is that where it's installed?
In my jail it's located at
Code:
/usr/local/www/phpMyAdmin


my nginx.conf relevant portion

user www;
worker_processes 4;


error_log /var/log/nginx/error.log info;


#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name 192.168.5.55;
root /usr/local/www/nginx;
index index.php index.html index.htm;

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
#location / {
# try_files $uri $uri/ =404;
#}
#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root /usr/local/www/nginx;
index index.html index.htm;
}

#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 /usr/local/www/nginx-dist;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Try symlinking phpadmin to your root directory.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Try symlinking phpadmin to your root directory.
Code:
/usr/local/www/nginx # ls -l
total 10
-rw-r--r--  1 www  www  612 Aug 20 16:33 index.html
-rw-r--r--  1 www  www   21 Aug 20 16:33 info.php
lrwxr-xr-x  1 www  www   26 Aug 20 16:44 phpmyadmin -> /usr/local/www/phpmyadmin/
lrwxr-xr-x  1 www  www   25 Aug 20 22:07 phpMyAdmin -> /usr/local/www/phpMyAdmin

I had to go to http://myjailIP/phpMyAdmin/index.php to get to the login. I presume I had to change the owner to www:www as my nginx user is www
Thanks for the help.
 
Status
Not open for further replies.
Top