Nginx virtual host directory is empty ... (???)

Discussion in 'Installation/Configuration' started by Evelio Martínez, Jul 4, 2019.

  1. Evelio Martínez

    Evelio Martínez New Member

    Hello I have an ISPConfig3 Panel that several team developers use.
    Depending on the PHP version they choose they use PHP 5.6 o 7.0.
    I want to that default PHP version to work with is 7.
    I changed yesterday paths and rest of fields on Web tab configuration form on ISPConfig3 and when I try to save I get this strange message:

    El directorio de configuración de host virtuales de Nginx está vacío.
    El directorio de configuración para Vhost de Nginx es inválido.
    El directorio de configuración de host virtuales de Nginx habilitados está vacío.
    El directorio de configuración para Vhost habilitados de Nginx es inválido.
    El usuario de Nginx está vacío.
    El usuario de Nginx es inválido.
    El grupo de Nginx está vacío.
    El grupo de Nginx es inválido.
    El Socket de Nginx está vacío.
    nginx_cgi_socket_error_regex


    Nginx is not installed.
    ISPConfig version is 3.1.13p1
    Server version: Apache/2.4.25 (Debian)
    [INFO] php (cli) version is 7.0.33-0+deb9u3
    [INFO] php-cgi (used for cgi php in default vhost!) is version 5.6.30-0+deb8u1

    htf-common-issues.php does not report php-fpm but PHP 7.0.33-0+deb9u3 (fpm-fcgi) is also installed.
    This is the one I want to use by default but when I input these values I get the error said before.

    Also apache error log show this:
    [Thu Jul 04 12:20:01.185354 2019] [proxy_fcgi:error] [pid 22556] [client **.**.**.**:35627] AH01071: Got error 'Primary script unknown\n'

    Any idea?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What show commands
    Code:
    LANG=C apt-cache policy nginx
    
    LANG=C apt-cache policy apache2
    LANG=C lsb_release -a
    
    ISPConfig supports multiple PHP versions, choosable per website. There is Tutorial:
    https://www.howtoforge.com/tutorial...fig-3-from-debian-packages-on-debian-8-and-9/
    Did you use that for the setup?
    Default PHP Version can be altered on Debian GNU/Linux with
    Code:
    update-alternatives --config php
    update-alternatives --config php-cgi
     
    Evelio Martínez likes this.
  3. Evelio Martínez

    Evelio Martínez New Member

    Code:
    # LANG=C apt-cache policy nginx
    nginx:
      Installed: (none)
      Candidate: 1.10.3-1+deb9u2
      Version table:
         1.14.1-1~bpo9+1 100
            100 http://ftp.debian.org/debian stretch-backports/main amd64 Packages
         1.10.3-1+deb9u2 500
            500 http://debian.mirrors.ovh.net/debian stretch/main amd64 Packages
            500 http://security.debian.org stretch/updates/main amd64 Packages
    
    Code:
    # LANG=C apt-cache policy apache2
    apache2:
      Installed: 2.4.25-3+deb9u7
      Candidate: 2.4.25-3+deb9u7
      Version table:
     *** 2.4.25-3+deb9u7 500
            500 http://debian.mirrors.ovh.net/debian stretch/main amd64 Packages
            500 http://security.debian.org stretch/updates/main amd64 Packages
            100 /var/lib/dpkg/status
    
    Code:
    # LANG=C lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description:    Debian GNU/Linux 9.9 (stretch)
    Release:        7
    Codename:       stretch
    
    Code:
    # update-alternatives --config php-cgi
    Existen 2 opciones para la alternativa php-cgi (que provee /usr/bin/php-cgi).
    
      Selección   Ruta                 Prioridad  Estado
    ------------------------------------------------------------
    * 0            /usr/bin/php-cgi7.0   70        modo automático
      1            /usr/bin/php-cgi7.0   70        modo manual
      2            /usr/bin/php5-cgi     50        modo manual
    
    No, I did not follow that manual.
    Today I have followed that manual to add PHP 7.1 and 7.2 version hoping it could fix the strange behaviour.
    But the web tab is still with blank values and if I try to save with the old values I get the "nginx" strange error messages.
    It has no sense. The old web sites are running ok but I cannot create/add new websites.
    The vhost is not created.
    The web[number] is not created in /etc/passwd, symbolic links are not created also.

    Any idea.
     

    Attached Files:

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely the server settings data is broken. Do you have a backup of the dbispcoinfig database where you could get the content of the 'server' table from?
     
    Evelio Martínez likes this.
  5. Evelio Martínez

    Evelio Martínez New Member

    I have the one that make the "ispconfig_update.sh" when updating ISPConfig version but it is from 2019-03-20_12-25.
    Should I restore it?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    That should be fine. Please do not restore the while dump, just open the .sql file with a text editor and find the insert statement which adds the data into the 'server' table, restore just that one. of course, do a backup of your current dbispconfig first with phpmyadmin, just to be sure. Them empty/truncate (not delete) the server table in the dbispconfig database and run the insert query that you got from backup file to get the last working version back.
     
  7. Evelio Martínez

    Evelio Martínez New Member

    ok, many thanks. it worked ok.
    I don't have the strange nginx error message now on web tab when saving.

    I will try to figure out why some of the Virtual host are redirecting to another one by default, but that, seems to be another different history.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Two possible reasons:

    1) Not all have SSL enabled which means ssl request for domains that have no ssl enabled will end up in the first site which ahs ssl.
    2) Don't mix * and the IP address in IPv4 field on a server. Either use * for all sites or the IP address.
     
  9. Evelio Martínez

    Evelio Martínez New Member

    Thank you Till. Both reasons were correct.
     

Share This Page