1

Topic: php7.0-fpm.sock missing

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  Latest
- Linux/BSD distribution name and version:  16.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:
====

Hi I'm trying to install nextcloud with iRedmail but one of the steps requires pointing upstream php handler to php7.0-fpm.sock which is missing from the /var/run/php/ directory. If i try https://myip/nextcloud i get a 502 error.

I've found a similarly named file in /var/fun/php-fpm.socket and i tried pointing it to that however that gives me a 404 error

Any idea what i can do?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: php7.0-fpm.sock missing

The php-fpm socket on Ubuntu 16.04 is /var/run/php-fpm.socket.

The 404 error may be caused by your (improper) Nginx config, it's better to show us full config here so that we can help figure it out.

3

Re: php7.0-fpm.sock missing

Here is my 00-default.conf any help would be greatly appreciated.

Post's attachments

00-default.conf 6.4 kb, 7 downloads since 2016-08-27 

You don't have the permssions to download the attachments of this post.

4

Re: php7.0-fpm.sock missing

Suggestion: Move all your nextcloud config to file /etc/nginx/templates/nextcloud.tmpl, then include it in 00-default.conf BEFORE line "include /etc/nginx/templates/php-catchall.tmpl;".

If it still has error, please show us original error message in your web browser and Nginx error log file.

5

Re: php7.0-fpm.sock missing

I did all of that and im still getting this error in the /var/log/nginx/error.log :

2016/08/28 01:45:00 [error] 22301#22301: *18 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET /nextcloud HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.socket:", host: "localhost"

Also included the new  00-default.conf and nextcloud.tmpl in the attatchment

Post's attachments

00-default.conf 2.26 kb, 6 downloads since 2016-08-27 

nextcloud.tmpl 4.2 kb, 8 downloads since 2016-08-27 

You don't have the permssions to download the attachments of this post.

6

Re: php7.0-fpm.sock missing

In nextcloud.tmpl:

location /nextcloud {
            rewrite ^ /nextcloud/index.php$uri;
        }

Do you have directory '/nextcloud' (under the root directory "/" of your server)? Show us output of command please:

ls -dl /nextcloud

7

Re: php7.0-fpm.sock missing

yes the nextcloud folder is in the /var/www/ directory

using the command ls -dl /nextcloud would output:

root@hostname:/var/www# ls -dl nextcloud
drwxr-xr-x 14 www-data www-data 4096  八  25 04:01 nextcloud

8

Re: php7.0-fpm.sock missing

Ok after days of research and hundreds of attempts of changing configurations. I finally got it to load.

Turns out for the https block all I had to do was to add an extra "root /var/www/;" above the "index index.php index.html;" just like in the http block.

Did i break anything by adding this?

9

Re: php7.0-fpm.sock missing

You didn't understand my point.

If the real directory is /var/www/nextcloud, you should update the "location /nextcloud {}" to below one:

location /nextcloud {
            rewrite ^ /var/www/nextcloud/index.php$uri;
        }

10

Re: php7.0-fpm.sock missing

ZhangHuangbin wrote:

You didn't understand my point.

If the real directory is /var/www/nextcloud, you should update the "location /nextcloud {}" to below one:

location /nextcloud {
            rewrite ^ /var/www/nextcloud/index.php$uri;
        }

No i tried that already before you suggested it and it didn't work. In fact, I just tired it again just now to double check and can confirm that it doesn't work to change that rewrite directive.