The upgrade busted my little server app, and I think I’m close to making it work, but I’m not actually that well versed in Apache/PHP…just dangerous.
I solved my problem. Maybe this will help some other adventurous soul.
-
If you put your app in a directory other than the servers web root (/var/www) comment out the doc_root parameter in php.ini. I believe that by setting this, PHP was forced to only work from that directory. Without it, PHP will work from the root specified by php-fpm, or what your vhost overrides it with.
-
If you implement authentication in your app and use PHP_AUTH_USER / PHP_AUTH_PW, they will always be unset when using php-fpm unless you add CGIPassAuth On in your vhost. I added it to .htaccess based on the example I saw (and I’m not going to touch it at this point), but I’m not sure what the criteria is for where it must go.
NOTE: After making/deploying the preceding two changes, the php-fpm must be restarted with /usr/sbin/php-fpm.sh reload. I use a shell script to reload both php-fpm and apache anytime I dink with settings.
- If URL paths within your app contain path formatted parameters (e.g., /base/param1/param2), PHP may not be able to distinguish the parameters from the base unless you set AcceptPathInfo On. I put mine in the vhost declaration.
Using these changes, I verified that the MyCloud dashboard and PLEX server work. I don’t use any other web features of the PR4100 so I can’t vouch for those.