0

I recently moved my cakephp 3 dev environment onto a network share.

The server in question has only had a path change for the nginx webroot (root /var/www/webroot, to root /mnt/dev/webroot).

I am mounting the CIFS share via /etc/fstab as follows:

//nfs/WebDev /mnt/dev cifs username=webdev,password=hunter2,gid=www-data,uid=www-data,rw,noserverino 0 0

For some reason cakephp index page times out when I access the index page (nginx 504: Gateway Timeout). If I create a test script of

<?php
phpinfo();

The page loads instantly with the correct output - this shows there should be no issue between nginx and php-fpm.

When I run time /mnt/dev/webroot/index.php from the shell, I get the correct HTML output and the command executes in less than 1 second. This shows that php-cli can read from the NFS share and executes properly.

I am at a total loss as to what has caused the dev server to completely break and would gladly appreciate any help into understanding why it is being an absolute utter pain!

Config Files (sorry I had to link all the config files on a single page).

Edit:

  • If I run php -S localhost:8080 on Windows on the webroot directory, everything works fine
  • If I run php -S dev.local:8080 on the Dev Server on the webroot directory, everything runs and I can access it from my Windows machine
Huw Jones
  • 1
  • 2
  • May be problem not with your mounted cifs share. Error 504 return when your upstream aswers more then default timeout(60 seconds). Could you enable php-fpm logs and check what you receive. Also please share output for `ls -la /var/run/php5-fpm.sock`. – Alexander Tolkachev Jun 07 '17 at 19:58
  • [/var/log/php5-fpm.log](https://pastebin.com/m15K0LED) `ls` output: `srw-rw---- 1 www-data www-data 0 Jun 7 19:22 /run/php5-fpm.sock` I've just copied the entirety of the CIFS share to the local drive and see if that makes a difference, will update in a bit... – Huw Jones Jun 07 '17 at 23:40

1 Answers1

0

A clean install of Debian + nginx + php5-fpm solved my issue and the fresh dev server install works.

As to the root cause, I'm unsure, but will diff the config files and work out what the hell I was doing that caused the fuckery

Huw Jones
  • 1
  • 2