0

I have trouble installing ispconfig 3 on my (L)Ubuntu 15.04. I can fully install ispconfig but I can't reach the website when viewing the virtual host of apache2. I can open ispconfig from https://localip:9090/ but the PHP isn't parsed/processed!

My host config file: /etc/apache2/sites-available/ispconfig.conf looks like this:

################################################
# 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

And the second /etc/apache2/sites-available/ispconfig.vhost looks like:

######################################################
# 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 works on other virtual hosts! What is the problem?

1

In your ispconfig.vhost file, see this block:

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

It tells to not associate any handler for php files. A little after, you have another block:

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

This block tells that if the module mod_fcgid is loaded then let fcgid-script handle php files.

It means that if you haven't enabled the FastCGI module, nothing can manage php files here.

Maybe you haven't installed the libapache_mod_fcgid, or it is not enabled (cf: a2enmod fcgid)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.