Problems after 2 years :-(

Discussion in 'Installation/Configuration' started by SpeedyB, Mar 13, 2013.

  1. SpeedyB

    SpeedyB Member HowtoForge Supporter

    Hello,

    I installed my server about two years ago according to the following guide:
    http://www.howtoforge.com/perfect-server-debian-squeeze-with-bind-and-courier-ispconfig-3

    I extended this installation with the following add-ins:
    * Suhosin
    * mod-Security
    * RoundCube
    * and GNUTls.
    All with guides from this website....
    somewhere in this time there is a change which now breaks my setup with ISPConfig 3.0.5


    I have to reeanable the following part in the ispconfig.vhost:

    Code:
    <IfModule mod_php5.c>
    DocumentRoot /usr/local/ispconfig/interface/web/
    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
    Order allow,deny
    Allow from all
    php_value magic_quotes_gpc 0
    </Directory>
    </IfModule>
    and modify the permissions on the file /usr/local/ispconfig/interface/lib/config.inc.php
    to 640


    What happens.

    If I remove the mod_php part I get an redirect loop
    If I don't set the permissions I get an error 500

    the second one I get. In the mod_fcgid part the process is excecuted as ispconfig ispconfig.. and that has permissions to access the file

    the first one I find hard to troubleshoot since the logging is really not any help in this...
    There is nothing written to the access.log, the error.log only states:
    Code:
    page 1: illegal page type or format
    PANIC: Invalid argument
    PANIC: fatal region error detected; run recovery
    I found that there is a new version of the Perfect install (http://www.howtoforge.com/perfect-server-debian-squeeze-debian-6.0-with-bind-dovecot-and-nginx-ispconfig-3) which adds an additional chapter to the installation:
    12 Install Nginx, PHP5 (PHP-FPM), And Fcgiwrap

    Since my servers are running in a production environment I cannot do these steps now without loosing business :-(
    It might that there are more changes in the new setup, might there be something I can do to make my installation more current ???
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats a nginx guide and not a guide for apache, so this does not apply to your setup, so dont do any step from this guide! Please see apache guides for your linux distribution on the ispconfig documentation page if you like to compare your current setup with the one of the perfet setup.
     
  3. SpeedyB

    SpeedyB Member HowtoForge Supporter

    I thought since it mentioned the fcgiwrap that it might be a valid point...

    Can you point me to the most current apache which I can compare with?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    But it is for the nginx server. Applying something mentioned for nginx on a apche server is as if you use a windows guide to install your linux server :)

    All guides are listed on the documentation page:

    http://www.ispconfig.org/documentation/

    Which one is the right for you depends on your linux distribution. If a guide is for nginx is described in the title of the guide.
     
    Last edited: Mar 13, 2013
  5. SpeedyB

    SpeedyB Member HowtoForge Supporter

    I use Debian 6, and the document I referred to was for debian and didn't look any further ;-) But the document I used is still the one on the site :)

    I have a phpinfo run from http://www.steelooper.net/phpinfo.php can you find something obvious wrong in there?? I cannot find any real differences between my setup and the documentation :-( and am currently really at a loss in this.

    The only file I ever modified in the default set is:
    ispconfig.vhost
    master.cf
    main.cf
    but only 1 is related to Apache..
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. Thats the guide that we used to develop ispconfig 3,0,5 on, so its the most tested configuration for ispconfig.

    Please reun all commands from chapter 12 of the guide to ensure that all packages are there.

    Additionally you can check if the apache fcgid module is enabled with:

    a2enmod fcgid
     
  7. SpeedyB

    SpeedyB Member HowtoForge Supporter

    Check for all packages:
    install: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    Check for all modules
    Module suexec already enabled
    Module rewrite already enabled
    Module ssl already enabled
    Module actions already enabled
    Module include already enabled
    Considering dependency dav for dav_fs:
    Module dav already enabled
    Module dav_fs already enabled
    Module dav already enabled
    Module auth_digest already enabled

    Module fcgid already enabled

    ========
    I have downloaded the VMWare image now, to do some troubleshooting.

    When I update the VMWare version from 3.0.3.2 to the stable I get errors on
    installer_base.lib.php on lines 579,580 and 581


    ===

    I updated and found that the vmware image is working..

    next I copied my config files over to the vmware machine
    all of /etc/apache and /etc/php
    removed the enabled-sites

    all is working :-( in the VMWare machine

    ---

    So I removed all the sites in my production environment...

    restarted apache...

    Not working :-(


    Is there some location which I can be missing in all this?
    /etc/apache
    /etc/php
    are identical on both machines
    all modules and configs are the same
     
  8. SpeedyB

    SpeedyB Member HowtoForge Supporter

    I have been busy yesterday with this problem... I ran the command:
    dpkg --get-selections
    on both servers, and there were some differences...

    On the VMWare machine the following additional packages where installed:
    bash-completion bc dc libc6-i386 libdb4.6 libgc1c2 libgpgme11 libgssglue1 libnfsidmap2 libpth20 librpcsecgss3 libtokyocabinet8 libuuid-perl mlocate ncurses-term nfs-common openssh-blacklist-extra telnet xauth

    So I installed them on my machine also... No luck..

    The very strange thing is that the same config on the VMWare machine is working.... I thought it might be the GNUTLS which is an issue, but that is working on the VMWare Machine...

    In the logfile I see the following when I enable debug (it is repeated about 20 times on opening the website):
    Code:
    [Wed Mar 13 21:34:57 2013] [debug] gnutls_cache.c(473): (89026)Error string not specified yet: [gnutls_cache] error storing in cache '/var/cache/apache2/gnutls_cache'
    [Wed Mar 13 21:34:57 2013] [debug] mod_deflate.c(615): [client XXX.XXX.XXX.XXX] Zlib: Compressed 205 to 166 : URL /
    
    In the CustomLog I see the following:
    Code:
    XXX.XXX.XXX.XXX - - [13/Mar/2013:21:34:57 +0100] "GET / HTTP/1.1" 302 3900 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17"
    XXX.XXX.XXX.XXX - - [13/Mar/2013:21:34:57 +0100] "GET / HTTP/1.1" 302 3964 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17"
    XXX.XXX.XXX.XXX - - [13/Mar/2013:21:34:57 +0100] "GET / HTTP/1.1" 302 3676 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17"
    XXX.XXX.XXX.XXX - - [13/Mar/2013:21:34:57 +0100] "GET / HTTP/1.1" 302 3660 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17"
    

    I hope someone might still have a clue what it could be...
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats strange. Have you tried to replace the ispconfig vhost file with the one from the vmware image, just as a test? You might also want to check if the path to the php binary in the fcgi starter script of the ispconfig vhost is correct.

    Basically the only difference between 3.0.4.6 and 3.0.5 is the switch from mod_php to fcgi, so the only known issue is that it can be caused by missing or not enabled modules like in this case:

    http://www.howtoforge.com/forums/showpost.php?p=293912&postcount=57
     
  10. SpeedyB

    SpeedyB Member HowtoForge Supporter

    When I copied the ispconfig.vhost file from the VMWare to the server, i tried to connect to http://ip:8080
    but it was redirecting me to https://ip:8080


    I copied then the whole apache2 folder from the VMWare machine to my production server.. and the same still happened.. I still get redirected to https... I even installed a new PC to try it, moved to another internet connection (different ISP)

    Is there in ISPConfig a configuration that redirects to https?? I cannot find it in the apache folder :-(
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    No. If such a redirect occurs on your server, then it is not initiated by a ispconfig script or setting.
     
  12. SpeedyB

    SpeedyB Member HowtoForge Supporter

    I found the redirect.... I disabled mod rewrite and looked where it went wrong :)

    The file /var/www/ispconfig/.htaccess
    contains:
    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    
    the timestamp on the file is Oct 18 2011....

    I removed the file and now it is working...

    It was a problem now because the documentroot is changed from /var/www/ispconfig/web to /var/www/ispconfig/

    BTW... In the VHOST Files the rewriterules are created without
    Code:
    <IfModule mod_rewrite.c> 
    </IfModule>
    
    Is this on purpose or should I create a bugreport for this?
     
    Last edited: Mar 14, 2013
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig does not use any .htaccess file in that direcory, so thats not a ispconfig bug. If there is such a file, then you must have added it.

    Thats ok as mod_reqwrirte is a system requirement for all ispconfig servers since the first ispconfig version, so there can not be a server without that.
     
  14. SpeedyB

    SpeedyB Member HowtoForge Supporter

    I know the .htaccess file is not a bug... That was me trying to force HTTPS as a test. And since the root was in a level lower, it never worked, and got never cleaned up...


    For troubleshooting reasons it would be nice to include the ifmodule... Than it is possible to disable mod_rewrite for troubleshooting purposes..
    That was also the reason I asked if I should create a bugreport for that... I know it now, so I can do it manually if needed...

    If I change something to a website, is the whole VHOST recreated, or are the modifications inserted into the existing file?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    The vhost file is recreated based on the vhost template file in /usr/local/ispconfig/server/conf/
     

Share This Page