Apache on Debian 4 problems (ISPConfig)

Discussion in 'Server Operation' started by Leftblank, Apr 18, 2007.

  1. Leftblank

    Leftblank New Member

    I've followed the big 'Perfect Debian 4 setup' guide posted on the frontpage here, which helped me fix just about everything I've had trouble with, except for a couple of small things.

    One of the things that have been wrong is the php configuration, in the guide it was suggested to commento out all of the php mime-types and such before installing ISPConfig. After the install however, accounts with 'Can run PHP' enabled still weren't able to run any PHP apps, nor was it possible in any directory outside of the autogenerated 'websites'. I've fixed this by uncommenting the statements, but I still don't think I can enable or disable PHP (safe mode) - is the guide wrong there or did I miss something?

    Before I had ISPConfig running I also had a 'website' (my domain) running from the folder /var/www/. After the setup it's still running, and can be found on http://headlinr.net/info.php (nothing else is on it atm), which works 'ok'. However, all the subdomains I've created so far are also publicly visible if you know the right URL, an example of this is ' http://headlinr.net/ots2.headlinr.net/ ' - I'm unable to test it with 'real' domained accounts.

    As these directories might contain stuff that aren't supposed to be world visible, I'm looking for a way to fix this. I suppose it's related to the trouble with PHP, but I haven't got a clue how to fix it - help would be highly appreciated!

    Thanks in advance,
     
  2. Leftblank

    Leftblank New Member

    A little additional error report; somehow files I upload to the account assigned to the subdomain 'ots.headlinr.net', are only findable when using the URL http://headlinr.net/web1/user/web1_otserv/web/ and not using the 'real' domain - quite a problem as my hsot is somewhat unusable right now.
     
  3. falko

    falko Super Moderator ISPConfig Developer

    The guide is working perfectly, I double-checked it before it was published, so there must be some problem on your system.
    What's in your Vhosts_ispconfig.conf? What's the output of
    Code:
    ifconfig
    ?
    You should disable PHP again globally because otherwise all web sites have PHP enabled, no matter what you specify in ISPConfig.

    You should disable the old web site and re-create it with ISPConfig. And ots2.headlinr.net should be accessible if it's pointing to the correct IP address and you used the correct IP address in ISPConfig.
     
  4. Leftblank

    Leftblank New Member

    Somehow my 'Vhosts_ispconfig.conf' stays completely empty, various versions of it containing a timestamp (such as Vhosts_ispconfig.conf_19-04-07_16-19-16) are created though, containing the right details. Copying these files into the 'main' file didn't have much effect though. The contents are below:
    Code:
    ResourceConfig /dev/null
    AccessConfig /dev/null
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost 85.214.98.188
    <VirtualHost 85.214.98.188>
      ServerName localhost
      ServerAdmin [email protected]
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    NameVirtualHost 85.214.98.188
    <VirtualHost 85.214.98.188>
      ServerName localhost
      ServerAdmin [email protected]
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: serskeland.headlinr.net
    ######################################
    #
    #
    <VirtualHost 85.214.98.188>
    ServerName serskeland.headlinr.net
    ServerAdmin [email protected]
    DocumentRoot /var/www/web4/web
    ServerAlias headlinr.net
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ScriptAlias  /cgi-bin/ /var/www/web4/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web4/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    AddType text/html .shtml
    AddHandler server-parsed .shtml
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    
    My ifconfig command returned the following
    Code:
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:1230265317 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1631414003 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1141327830 (1.0 GiB)  TX bytes:1096235447 (1.0 GiB)
    
    venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
              inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
              UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
              RX packets:219123 errors:0 dropped:0 overruns:0 frame:0
              TX packets:194348 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:99686062 (95.0 MiB)  TX bytes:51792928 (49.3 MiB)
    
    venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
              inet addr:85.214.98.188  P-t-P:85.214.98.188  Bcast:0.0.0.0  Mask:255.255.255.255
              UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
    
    I've tried readding the main domain the server listens to (headlinr.net), but this didn't have any results. I neither managed to recreate the frontpage, the panel claims the domain is already in use, no matter what I try - isn't there a way to completely reset the ISPConfig settings?
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Please rename one of these files to Vhosts_ispconfig.conf and run
    Code:
    httpd -t
    What's the output?
     
  6. Leftblank

    Leftblank New Member

    Thanks for your response, scratch my old reply. This is the output:
    Code:
    h1261026:/home/otserv/.otserv/data$ httpd -t
    Syntax error on line 34 of /etc/apache/vhosts/Vhosts_ispconfig.conf:
    Invalid command 'php_admin_flag', perhaps mis-spelled or defined by a module not included in the server configuration
    I'm using PHP/MySQL 5, if that matters.
     
    Last edited: Apr 20, 2007
  7. falko

    falko Super Moderator ISPConfig Developer

    This means that the PHP module is not enabled in your Apache configuration. Please change that and restart Apache.
     
  8. Leftblank

    Leftblank New Member

    Thanks for your response, however, according to Apache I've got the PHP5 installed and active, but unless I add the mimetypes back it will not parse anything - even though it looks the Vhost look 'ok'.
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Are you sure you followed the Debian Etch Perfect Setup as close as possible?
    Did you install the system from scratch, or did you get it pre-installed?
     
  10. Leftblank

    Leftblank New Member

    I'm sorry I didn't mention that, sadly it was an upgrade from a pre-installed Debian 3.1 installation, I've followed the guide very slowly though as I had to upgrade/install most of the stuff - sadly I don't have any 'hard' access to the server to a clean installation is no option as of now.
     

Share This Page