ispconfig PHP não está analisando no host virtual do apache2

0

Eu tenho problemas para instalar o ispconfig 3 no meu (L) Ubuntu 15.04. Posso instalar completamente ispconfig , mas não consigo acessar o site ao visualizar o host virtual de apache2 . Eu posso abrir ispconfig de https://localip:9090/ mas o PHP não é analisado / processado!

Meu arquivo de configuração do host: /etc/apache2/sites-available/ispconfig.conf tem esta aparência:

################################################
# ISPConfig Logfile configuration for vlogger
################################################

LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig

<Directory /var/www/clients>
    AllowOverride None
        Require all denied
    </Directory>

# Do not allow access to the root file system of the server for security reasons
<Directory />
    Options -Indexes
    AllowOverride None
        Require all denied
    </Directory>

<Directory /var/www/conf>
    AllowOverride None
        Require all denied
    </Directory>

# Except of the following directories that contain website scripts
<Directory /usr/share/phpmyadmin>
                Require all granted
        </Directory>

<Directory /usr/share/phpMyAdmin>
                Require all granted
        </Directory>

<Directory /srv/www/htdocs>
                Require all granted
        </Directory>

<Directory /usr/share/squirrelmail>
                Require all granted
        </Directory>

# Allow access to mailman on OpenSuSE
<Directory /usr/lib/mailman/cgi-bin>
                Require all granted
        </Directory>

<Directory /usr/lib/mailman/icons>
                Require all granted
        </Directory>

<Directory /var/lib/mailman/archives/>
        Options +FollowSymLinks
                Require all granted
        </Directory>

# allow path to awstats and alias for awstats icons
<Directory /usr/share/awstats>
                Require all granted
        </Directory>


NameVirtualHost *:80
NameVirtualHost *:443

E o segundo /etc/apache2/sites-available/ispconfig.vhost se parece com:

######################################################
# This virtual host contains the configuration
# for the ISPConfig controlpanel
######################################################

 Listen 9090
NameVirtualHost *:9090

<VirtualHost _default_:9090>
  ServerAdmin webmaster@localhost

  <FilesMatch "\.ph(p3?|tml)$">
    SetHandler None
  </FilesMatch>

  <IfModule mod_fcgid.c>
    DocumentRoot /var/www/ispconfig/
    SuexecUserGroup ispconfig ispconfig
    <Directory /var/www/ispconfig/>
      Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
      AllowOverride AuthConfig Indexes Limit Options FileInfo
      <FilesMatch "\.php$">
          SetHandler fcgid-script
      </FilesMatch>
      FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
          Require all granted
          </Directory>
    IPCCommTimeout  7200
    MaxRequestLen 15728640
  </IfModule>

  <IfModule mpm_itk_module>
    DocumentRoot /usr/local/ispconfig/interface/web/
    AssignUserId ispconfig ispconfig
    AddType application/x-httpd-php .php
    <Directory /usr/local/ispconfig/interface/web>
      # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
      Options +FollowSymLinks
      AllowOverride None
          Require all granted
          php_value magic_quotes_gpc        0
    </Directory>
  </IfModule>

  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off

  <IfModule mod_security2.c>
    SecRuleEngine Off
  </IfModule>

  # SSL Configuration
  SSLEngine On
  SSLProtocol All -SSLv2 -SSLv3
  SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
  SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
DocumentRoot /var/www/ispconfig
  #SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle

</VirtualHost>

<Directory /var/www/php-cgi-scripts>
    AllowOverride None
        Require all denied
    </Directory>

<Directory /var/www/php-fcgi-scripts>
    AllowOverride None
        Require all denied
    </Directory>

PHP funciona em outros hosts virtuais! Qual é o problema?

    
por James Miller 28.07.2015 / 13:56

1 resposta

1

No seu arquivo ispconfig.vhost , veja este bloco:

<FilesMatch "\.ph(p3?|tml)$">
  SetHandler None
</FilesMatch>

Diz para não associar nenhum handler para arquivos php. Um pouco depois, você tem outro bloco:

<IfModule mod_fcgid.c>
...
  <FilesMatch "\.php$">
      SetHandler fcgid-script
  </FilesMatch>
...
</IfModule>

Este bloco informa que se o módulo mod_fcgid for carregado então deixa fcgid-script manipular arquivos php.

Isso significa que, se você não ativou o módulo FastCGI, nada pode gerenciar arquivos PHP aqui.

Talvez você não tenha instalado o libapache_mod_fcgid ou não esteja ativado (cf: a2enmod fcgid )

    
por 28.07.2015 / 15:50