needed: default

Discussion in 'Installation/Configuration' started by louitz, Nov 7, 2011.

  1. louitz

    louitz New Member

    Ubuntu 10.04
    ISPconfig 3033

    I broke the file /etc/apache2/sites-enabled/000-ispconfig.vhost without having made a backup of it, my bad!

    I wanted to bind the control panel to one particular domain and messed up the file, apache2 won't start anymore.

    Cpuld someone please post the content of the file:
    /etc/apache2/sites-enabled/000-ispconfig.vhost

    So I can restore it?

    thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Code:
    ######################################################
    # This virtual host contains the configuration
    # for the ISPConfig controlpanel
    ######################################################
    
    NameVirtualHost *:8080
    
    <VirtualHost _default_:8080>
      ServerAdmin [email protected]
      
      <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
          AddHandler fcgid-script .php
          FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
          Order allow,deny
          Allow from all
        </Directory>
      </IfModule>
      
      <IfModule mod_php5.c>
        DocumentRoot /usr/local/ispconfig/interface/web/
        AddType application/x-httpd-php .php
        <Directory /usr/local/ispconfig/interface/web>
          Options FollowSymLinks
          AllowOverride None
          Order allow,deny
          Allow from all
    	  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
      # SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
      # SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
    
    </VirtualHost>
    
    <Directory /var/www/php-cgi-scripts>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    <Directory /var/www/php-fcgi-scripts>
        AllowOverride None
        Order Deny,Allow
        Deny from all
    </Directory>
    
    
     
  3. louitz

    louitz New Member

    Thanks till, I matched your file to the file I have, and get this error:

    apache2: Syntax error on line 236 of /etc/apache2/apache2.conf: Syntax error on line 10 of /etc/apache2/sites-enabled/000-ispconfig.vhost: </VirtualHost without matching <VirtualHost section

    I appreciate the help
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    What is in line 10 of your file?
     
  5. louitz

    louitz New Member

    Hey till,
    The situation changed now after moving the original file away and created an empty file and pasted your config in there.
    At the moment apache2 starts, but the control panel at port 8080 is not reachable.
    I did this as root, perhaps a permission issue?!
     
  6. louitz

    louitz New Member

    [email protected]:/etc/apache2/sites-available# ls -al
    total 36
    drwxr-xr-x 2 root root 4096 Nov 7 12:57 .
    drwxr-xr-x 7 root root 4096 Oct 18 20:23 ..
    -rw-r--r-- 1 root root 1022 Nov 2 15:35 apps.vhost
    -rw-r--r-- 1 root root 948 Nov 18 2010 default
    -rw-r--r-- 1 root root 7467 Nov 18 2010 default-ssl
    -rw-r--r-- 1 root root 1248 Nov 2 15:25 ispconfig.conf
    -rw-r--r-- 1 root root 1677 Nov 7 14:40 ispconfig.vhost
    -rw-r--r-- 1 root root 1701 Nov 7 12:54 ispconfig.vhost~
     
  7. louitz

    louitz New Member

    Apache starts without errors now, webmail is up etc, but cannot get the admin page to pop up anymore.

    removed in sites-enabled the file 000-ispconfig.vhost
    then run a2ensite ispconfig.vhost (for sites available)
    reloaded and restarted apache2 without errors, and no admin page at port 8080.
    Then rebooted just to be sure, but no luck.

    Would like some help, I have not done any config in ISPconfig so I can still reinstall or something like that if that could solve the issue of not being able to view the console panel webpage. <edit> If you could give me the right procedure for a reinstall

    many thanks,

    louis
     
    Last edited: Nov 7, 2011
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Which exact error message do you get when you enter:

    http://192.169.0.1:8080 in your browser. Replace 192.169.0.1 with the IP address of your server, not the hostname.
     
  9. louitz

    louitz New Member

    Unable to connect







    Firefox can't establish a connection to the server at [iwilltellyoutheipinprivateifyouwantmeto]:8080.





    The site could be temporarily unavailable or too busy. Try again in a few
    moments.
    If you are unable to load any pages, check your computer's network
    connection.
    If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

  11. louitz

    louitz New Member

    thanks till, but this brings on new problems.

    I run the script, choose stable, but it doesn't give me the chance to enter the mysql psw and I get the following messages in the end:

    PHP Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /tmp/ispconfig3_install/install/lib/mysql.lib.php on line 78
    PHP Notice: Uninitialized string offset: 0 in /tmp/ispconfig3_install/install/lib/update.lib.php on line 127
    PHP Fatal error: Cannot use string offset as an array in /tmp/ispconfig3_install/install/lib/update.lib.php on line 127

    hmm..
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you changed the root password in mysql without changing it in in the ispconfig configuration file /usr/local/ispconfig/server/lib/mysql_clientdb.conf, so that the updater was not able to configure the system.

    Maybe you better reinstall ipconfig as you have no data on the server yet. Download the ispconfig 3 tar.gz file, unpack it. The run the "uninstall.php" script which is in the install folder and then run the install.php script again to install ispconfig.
     
  13. louitz

    louitz New Member

    thanks till, I will do that.
     
  14. louitz

    louitz New Member

    Ok, back to starting point again, happy to say..

    Doing a backup first now, before continuing. Did the following:

    Deleted entries in /etc/var/apache2/sites-available and sites-enabled concerning files containing 'ispconfig' only,
    Unistalled ispconfig:
    root#:/tmp/ispconfig3_install/install# php -q unistall.php

    Connected to mysql:
    mysql -u root -p

    show databases;
    use dbispconfig;
    drop database dbispconfig;
    \q

    Installed ispconfig: /tmp/ispconfig3_install/install# php -q install.php

    And answered the questions to the script, as described in the manual.

    Thanks guys!
     
  15. louitz

    louitz New Member

    so now the console works fine, but webmail is goners :)

    Owell, another day tomorrow :)

    ps this is not my blog :)
     
  16. louitz

    louitz New Member

    For the webmail i get:

    Forbidden
    You don't have permission to access /webmail/ on this server.
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

  18. louitz

    louitz New Member

    I followed the document, for both example.com/webmail and example.com/squirrelmail, but when I load the page I don't get the login page but the browser wants to download:

    application/x-httpd-suphp

    Not sure what to do about this..
     
  19. louitz

    louitz New Member

    This is the content of the file downloaded:

    <?php

    /**
    * index.php
    *
    * Redirects to the login page.
    *
    * @copyright 1999-2010 The SquirrelMail Project Team
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    * @version $Id: index.php 13893 2010-01-25 02:47:41Z pdontthink $
    * @package squirrelmail
    */

    // Are we configured yet?
    if( ! file_exists ( 'config/config.php' ) ) {
    echo '<html><body><p><strong>ERROR:</strong> Config file ' .
    '&quot;<tt>config/config.php</tt>&quot; not found. You need to ' .
    'configure SquirrelMail before you can use it.</p></body></html>';
    exit;
    }

    // If we are, go ahead to the login page.
    header('Location: src/login.php');

    ?>
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Is the apache suphp module installed on your server as described in the perfect setup guide for ubuntu 10.04?
     

Share This Page