ISPConfig 3.1 + Ubuntu 16.04 + nginx and php-fpm bug bad gateway

Discussion in 'Installation/Configuration' started by ang3lx, Oct 27, 2016.

  1. ang3lx

    ang3lx Member

    Hello,
    I've installed ISPConfig 3.1 on clean Ubuntu 16.04
    All works fine, but when I tried to oper panel nginx give me bad gateway error.
    Code:
    17, server: _, request: "GET /login/ HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "149.202.222.51:8080"
    2016/10/27 16:28:44 [error] 9214#9214: *9 FastCGI sent in stderr: "PHP message: PHP Warning:  require_once(/usr/local/ispconfig/interface/lib/config.inc.php): failed to open stream: Permission denied in /usr/local/ispconfig/interface/web/login/index.php on line 31
    PHP message: PHP Stack trace:
    PHP message: PHP   1. {main}() /usr/local/ispconfig/interface/web/login/index.php:0
    PHP message: PHP Fatal error:  require_once(): Failed opening required '/usr/local/ispconfig/interface/lib/config.inc.php' (include_path='.:/usr/share/php') in /usr/local/ispconfig/interface/web/login/index.php on line 31
    Looking into log I see 2 error that I should fix to have webpanel working well
    1) edit /etc/nginx/sites-available/ispconfig.vhost and change
    Code:
    fastcgi_pass unix:/var/lib/php5-fpm/ispconfig.sock;
    to
    Code:
    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
    2) do
    Code:
    chmod 660 /usr/local/ispconfig/interface/lib/config.inc.php
    today I've updated ispconfig to 3.1.1.. and nginx bad gateway error is again on my screen.
    i've to do this 2 operation again. Is it normal? How can fix this little problem
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Ubuntu 16.04 with nginx has not been tested yet and therefore is not supported. Supported is what we released as perfect server guides, so it is possible that ISPConfig 3.1 does not work on Ubuntu 16.04 yet.

    I will look into this OS and server combination in the next weeks and test it and fix issues if there are any.
     
  3. dcurrey

    dcurrey Member

    Have 3.1 working on 16.04 here. No issues with spconfig.vhost. Upgrading to 3.1.1 didn't change it.

    Mine however reads as
    fastcgi_pass unix:/var/lib/php7.0-fpm/ispconfig.sock;

    Note: Only have php7 installed
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig 3.1 has a config file for Ubuntu 16.04 with the sock file as @dcurrey posted and the same php-fpm values are used for apache and nginx, I know that it works for apache so it should work for nginx as well as @dcurrey reported. But as I wrote above, I have not tested that myself.

    @ang3lx: Are you sure that you do not use any custom template files that contain old values in /usr/local/ispconfig/server/conf-custom/ or /usr/local/ispconfig/server/conf-custom/install/ and that you do not have the old socket path somwhere under System > Serer config set in ispconfig (e.g. when your server was updated from an older Ubuntu version) ?
     
  5. ang3lx

    ang3lx Member

    @till thanks for reply
    /usr/local/ispconfig/server/conf-custom/install/ is empty, no old values
    My ISPConfig installation is clean on clean ubuntu 16.04 system, only update is from 3.1 to 3.1.1 (ps. I've both php 5.6 and 7.0)
    and here my PHP configuration
    [​IMG]
     
  6. BLWedge09

    BLWedge09 New Member

    I know there's not a perfect server guide for Ubuntu 16.04 (php7) + nginx yet, but that's the combo I'd really prefer to use on my new VPS setup....that will be replacing my old 12.04 Ubuntu + nginx Perfect Server setup that has been running well for several years now. I tried to closely follow the Ubuntu 15.10 +nginx guide (https://www.howtoforge.com/tutorial/perfect-server-ubuntu-with-nginx-and-ispconfig-3/) and replace the old php stuff with php7, but was unsuccessful. I'd really like to know what path some of you are following to get a working install. Any help would be appreciated.
     
  7. dcurrey

    dcurrey Member

    If kind of got a very sloppy script version of 14.04 that is doing my install.
    You should be able to use the above mentioned doc. I have this section creating my nginx I will just post the apt-get sections I have some custom files for other purposed created at the same time as my install.
    Code:
    apt-get -y install nginx apache2-utils
    # Install php 7.0
    apt-get -y install php php7.0 php7.0-common php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap  php7.0-cli php7.0-cgi php7.0-mcrypt php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl  php7.0-zip php7.0-opcache php7.0-mbstring php7.0-dev
    
    # Remaining php and misc stuff
    apt-get -y install phpmyadmin memcached php-memcache php-memcached php-geoip php-imagick php-pear php-auth php-gettext php-apcu fcgiwrap php-mbstring mcrypt imagemagick libruby
    
    Think that was it. So far everything seems to work except I have never figured out why my mail_stats are not updating properly.
     

Share This Page