Pydio using NGINX, PHP-FPM, and MySQL

Status
Not open for further replies.

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
Hey--

sorry, yeah was confusing the "defualt" php-fpm.conf.default with php.ini-production...

either way here are the only results of the above command:

Code:
; Multiple pools of child processes may be started with different listening



if I run the command on my old pydio jail I get what's probably expected:

Code:
; Multiple pools of child processes may be started with different listening

; - 'listen' (unixsocket)

;   'ip.add.re.ss:port'	- to listen on a TCP socket to a specific IPv4 address on

;   '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on

;   'port'				 - to listen on a TCP socket to all IPv4 addresses on a

;   '[::]:port'			- to listen on a TCP socket to all addresses

;   '/path/to/unix/socket' - to listen on a unix socket.

listen = 127.0.0.1:9000

; Set listen(2) backlog.

;listen.backlog = 65535

;listen.owner = www

;listen.group = www

;listen.mode = 0660

; When set, listen.owner and listen.group are ignored

;listen.acl_users =

;listen.acl_groups =

; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address

;listen.allowed_clients = 127.0.0.1

;   listen queue		 - the number of request in the queue of pending

;						  connections (see backlog in listen(2));

;   max listen queue	 - the maximum number of requests in the queue

;   listen queue len	 - the size of the socket queue of pending connections;

;   listen queue:		 0

;   max listen queue:	 1

;   listen queue len:	 42


I just tried swapping this default to the new server, replaced the relevant lines, restarted php-fpm and nginx, but still getting forbidden on the http://myjailip and "the page isn't working" on http://myjailip/pydio/index.php?ignore_tests=true

i'm confused as to why all the rest of that isn't in the new php-fpm.conf... for thoroughness sake here is the entire file:

;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;

; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr/local). This prefix can be dynamically changed by using the
; '-p' argument from the command line.

;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;

[global]
; Pid file
; Note: the default prefix is /var
; Default Value: none
pid = run/php-fpm.pid

; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; in a local file.
; Note: the default prefix is /var
; Default Value: log/php-fpm.log
;error_log = log/php-fpm.log

; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
; will be handled differently.
; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
; Default Value: daemon
;syslog.facility = daemon

; syslog_ident is prepended to every message. If you have multiple FPM
; instances running on the same server, you can change the default value
; which must suit common needs.
; Default Value: php-fpm
;syslog.ident = php-fpm

; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
;log_level = notice

; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 0

; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated. This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;emergency_restart_interval = 0

; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;process_control_timeout = 0

; The maximum number of processes FPM will fork. This has been design to control
; the global number of processes when using dynamic PM within a lot of pools.
; Use it with caution.
; Note: A value of 0 indicates no limit
; Default Value: 0
; process.max = 128

; Specify the nice(2) priority to apply to the master process (only if set)
; The value can vary from -19 (highest priority) to 20 (lower priority)
; Note: - It will only work if the FPM master process is launched as root
; - The pool process will inherit the master process priority
; unless it specified otherwise
; Default Value: no set
; process.priority = -19

; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
;daemonize = yes

; Set open file descriptor rlimit for the master process.
; Default Value: system defined value
;rlimit_files = 1024

; Set max core size rlimit for the master process.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0

; Specify the event mechanism FPM will use. The following is available:
; - select (any POSIX os)
; - poll (any POSIX os)
; - epoll (linux >= 2.5.44)
; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
; - /dev/poll (Solaris >= 7)
; - port (Solaris >= 10)
; Default Value: not set (auto detection)
;events.mechanism = epoll

; When FPM is build with systemd integration, specify the interval,
; in second, between health report notification to systemd.
; Set to 0 to disable.
; Available Units: s(econds), m(inutes), h(ours)
; Default Unit: seconds
; Default value: 10
;systemd_interval = 10

;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;

; Multiple pools of child processes may be started with different listening
; ports and different management options. The name of the pool will be
; used in logs and stats. There is no limitation on the number of pools which
; FPM can handle. Your system will tell you anyway :)

; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
; Relative path can also be used. They will be prefixed by:
; - the global prefix if it's been set (-p argument)
; - /usr/local otherwise
include=/usr/local/etc/php-fpm.d/*.conf
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@Lessbones you should be replacing the line "listen = 127.0.0.1:9000"
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
yes, I understand, and I did do that, as per my explanation at the bottom of the post, but i'm still not getting anything. However, don't you think it's strange that the php-fpm.conf-defualt for this particular build doesn't include any lines about "listen"?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
yes, I understand, and I did do that, as per my explanation at the bottom of the post, but i'm still not getting anything. However, don't you think it's strange that the php-fpm.conf-defualt for this particular build doesn't include any lines about "listen"?
yes it does, in your previous post that somehow got deleted you posted it
Code:
cat /usr/local/etc/php-fpm.conf.default | grep listen
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
oh, it appears it's still awaiting moderator approval... but this is all that comes up from the command in the current jail:

Code:
; Multiple pools of child processes may be started with different listening


and this is the entirety of php-fpm.conf.default:

;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;

; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr/local). This prefix can be dynamically changed by using the
; '-p' argument from the command line.

;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;

[global]
; Pid file
; Note: the default prefix is /var
; Default Value: none
pid = run/php-fpm.pid

; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; in a local file.
; Note: the default prefix is /var
; Default Value: log/php-fpm.log
;error_log = log/php-fpm.log

; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
; will be handled differently.
; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
; Default Value: daemon
;syslog.facility = daemon

; syslog_ident is prepended to every message. If you have multiple FPM
; instances running on the same server, you can change the default value
; which must suit common needs.
; Default Value: php-fpm
;syslog.ident = php-fpm

; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
;log_level = notice

; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 0

; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated. This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;emergency_restart_interval = 0

; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;process_control_timeout = 0

; The maximum number of processes FPM will fork. This has been design to control
; the global number of processes when using dynamic PM within a lot of pools.
; Use it with caution.
; Note: A value of 0 indicates no limit
; Default Value: 0
; process.max = 128

; Specify the nice(2) priority to apply to the master process (only if set)
; The value can vary from -19 (highest priority) to 20 (lower priority)
; Note: - It will only work if the FPM master process is launched as root
; - The pool process will inherit the master process priority
; unless it specified otherwise
; Default Value: no set
; process.priority = -19

; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
;daemonize = yes

; Set open file descriptor rlimit for the master process.
; Default Value: system defined value
;rlimit_files = 1024

; Set max core size rlimit for the master process.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0

; Specify the event mechanism FPM will use. The following is available:
; - select (any POSIX os)
; - poll (any POSIX os)
; - epoll (linux >= 2.5.44)
; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
; - /dev/poll (Solaris >= 7)
; - port (Solaris >= 10)
; Default Value: not set (auto detection)
;events.mechanism = epoll

; When FPM is build with systemd integration, specify the interval,
; in second, between health report notification to systemd.
; Set to 0 to disable.
; Available Units: s(econds), m(inutes), h(ours)
; Default Unit: seconds
; Default value: 10
;systemd_interval = 10

;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;

; Multiple pools of child processes may be started with different listening
; ports and different management options. The name of the pool will be
; used in logs and stats. There is no limitation on the number of pools which
; FPM can handle. Your system will tell you anyway :)

; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
; Relative path can also be used. They will be prefixed by:
; - the global prefix if it's been set (-p argument)
; - /usr/local otherwise
include=/usr/local/etc/php-fpm.d/*.conf
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
ohh, I think I know what's going on...
Those lines are now in '/usr/local/etc/php-fpm.d/www.conf' since PHP7

Lol, sorry for the confusion. I'll update the tutorial
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
ah! that would make a lot of sense... I was about to go looking for that conf file actually, but I had forgotten where i read about it ;) thanks for being so on top of it-- let me try with this new info---
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
Hey, so I created a completely fresh jail, redid all the instructions with the new www.conf location, but still getting "forbidden" on http://jail_ip and nothing on the pydio address... any thoughts?
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
the static file browsing works,

the results of sockstat are as follows:

Code:

www	  php-fpm	39748 0  stream /var/run/php-fpm.sock
www	  php-fpm	39747 0  stream /var/run/php-fpm.sock
root	 php-fpm	39746 6  stream -> ??
root	 php-fpm	39746 8  stream -> ??
root	 php-fpm	39746 9  stream /var/run/php-fpm.sock
mysql	mysqld	 21173 16 tcp4 6 *:3306				*:*
mysql	mysqld	 21173 17 stream /tmp/mysql.sock
www	  nginx	  21052 3  stream -> ??
www	  nginx	  21052 7  tcp4   *:80				  *:*
www	  nginx	  21052 8  tcp4   192.168.1.5:80		192.168.1.114:50429
www	  nginx	  21052 10 stream -> ??
www	  nginx	  21051 3  stream -> ??
www	  nginx	  21051 7  tcp4   *:80				  *:*
www	  nginx	  21051 8  stream -> ??
root	 nginx	  21050 3  stream -> ??
root	 nginx	  21050 7  tcp4   *:80				  *:*
root	 nginx	  21050 8  stream -> ??
root	 nginx	  21050 9  stream -> ??
root	 nginx	  21050 10 stream -> ??
root	 cron	   42380 4  dgram  -> /var/run/logpriv
root	 syslogd	42321 4  dgram  /var/run/log
root	 syslogd	42321 5  dgram  /var/run/logpriv
root	 syslogd	42321 6  udp6   *:514				 *:*
root	 syslogd	42321 7  udp4   *:514				 *:*
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
it's a generic http 500 error...

it feels like something very basic is wrong, but maybe something else has changed since the guide originally was written?

 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
it's a generic http 500 error...

it feels like something very basic is wrong, but maybe something else has changed since the guide originally was written?

Can you confirm you have the same issue with the latest stable version?

I think you were trying 6.5.5 but I'm actually not sure if the versions on github are stable, since they haven't been released on sourceforge, or the autoupdater
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
holy s**t. I just tried with the 6.4.2 version (the last stable version that I had known of) and I got the ###VERSION_NUMBER### error. I did a web search for that and was linked to a pydio.com thread, as well as back to post #55 of this thread-- then I tried loading the archive of the newest version from pydio's website (https://download.pydio.com/pub/core/archives/pydio-core-7.0.0.tar.gz) released yesterday, and it worked just fine.

So the changes here are:

Code:
fetch "https://download.pydio.com/pub/core/archives/pydio-core-7.0.0.tar.gz"


and instead of
Code:
mv pydio-core-pydio-core-*/core/src /usr/local/www/pydio


it's:

Code:
mv pydio-core-* /usr/local/www/pydio



***Edit:

Spoke too soon, of course. Pydio installer worked fine, but now all i've got is a blank page-- I'll try again with the 6.4.2 version later tonight
 

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
Just got a chance to test this again with the 6.4.2 version-- still getting a blank page after install...
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

Lessbones

Dabbler
Joined
Oct 17, 2016
Messages
22
Hey, thanks for your help with this. I just started from scratch again with 7.0.1, followed the instructions to a "T", and i'm still getting a blank page after the install procedure. Do you think it could be a permissions issue? I remember having this problem when I first installed on freenas, however that was too long ago to remember how to solve it. I'm going to also look elsewhere for solutions to this issue, but I don't understand why it would work only in some cases...

edit:

my nginx error.log file has a bunch of entries like this:

Code:
2016/11/06 16:44:21 [error] 2216#100740: *6 open() "/usr/local/www/plugins/gui.ajax/res/themes/orbit/css/allz.css" failed (2: No such file or directory), client: 192.168.1.55, server: , request: "GET /plugins/gui.ajax/res/themes/orbit/css/allz.css?v=7.0.1 HTTP/1.1", host: "192.168.1.5", referrer: "http://192.168.1.5/pydio/?ignore_tests=true"


i noticed that the location seems to be wrong, it should be /usr/local/www/pydio/plugins/gui.ajax/res/themes/orbit/css/allz.css afaik, but i tried editing that in the nginx.conf-- this only got me as far as getting a 500 internal server error... Is there anything else you think I could check ?
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@Lessbones
Ohh, I hit the same issue at first. During setup there was a part where it asked where pydio was available and I think I put http://jail_IP/pydio

I should add that to the steps, I have a feeling that setting would be stored in one of pydio's config files if you don't want to start from scratch.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
And, you might be able to work around the issue by editing nginx.conf and hosting pydio directly at / instead of /pydio.
 
Status
Not open for further replies.
Top