Problem when adding more than one site

Discussion in 'Installation/Configuration' started by gibbo1715, Mar 28, 2012.

  1. gibbo1715

    gibbo1715 New Member

    Hi All,

    First visit here as i've only just set up my first debian 6 server (Using one of the guides here so many thanks for that) which was great but i ve now come across a problem and im hoping you can help me out

    I ve set up my dns records for my base site fine and I created my first site using ispconfig3 fine and pointed my domain at it and again all works perfectly.

    I now want to create a second site so i've followed the same process but when i browse to the new site (I have also checked using the hosts file) it points at the servers root showing me the servers root webpage and not the ispconfig new site web page, i ve also set up ftp which goes to the right place so i know its been created on the server, i ve tired several different sites and replicated my first site exactly and nothing has worked, i seem to only be able to set up one site for some reason which im sure is wrong

    Can anyone give me an idea as to why this is happening please, I hope i ve explained myself properly

    Many Thanks

    Paul
     
  2. kwickcut

    kwickcut Member

    when u add a new site make sure that under IPv4-Address you have it set to * you do not want to use the server ip

    so it looks like
    IPv4-Address *

    and not
    IPv4-Address 123.456.789


    see if that helps


    kwick
     
  3. gibbo1715

    gibbo1715 New Member

    thankyou but it already is set at *

    thankyou but it is already set at * and not the root ip address

    any other ideas?

    thanks

    Paul
     
  4. till

    till Super Moderator

    Check all sites including your fist site to ensure that you dont mix * and the IP on the server in the site settings. So either all sites use the IP or all use *. If the first uses the Ip and all other s use *, then only the first site will be reachable.
     
  5. gibbo1715

    gibbo1715 New Member

    Thanks but all are *

    I ve checked and my only other site on ispconfig is * as well, the new sites seem to point at the servers welcome screen, not a default ISP config page

    Thanks

    Paul
     
  6. gibbo1715

    gibbo1715 New Member

    Just a thought ( im new to this so forgive me if this is daft) I followed the setting up debian server which ended up making my ispconfig control panel secure (https), my sites are not https, could that be the cause and make it so i cant add additional sites?

    if so how would i turn it off please

    Many Thanks

    Paul
     
  7. kwickcut

    kwickcut Member

    that should not matter my ispconfig is also https and all of my site are just http and i have no issues. now did you check to make sure all of the sites have different directory in apache. maybe check your vhost file to make sure they are correct and not all point to the same plave
     
  8. gibbo1715

    gibbo1715 New Member

    Sorry, can i ask how i would do that in an idiots guide please, I have however set up an ftp account and that definately works fine and goes to its own folders for the new site as expected, this is driving me nuts but i have no idea what i have done wrong, one site works perfectly but just cant add any others as they all point to the root webpage for the server

    Any other ideas as to what i may have done wrong

    thanks

    Paul
     
  9. kwickcut

    kwickcut Member

    run the following command

    Code:
    apache2ctl -S
    this will list your vhost file
     
  10. gibbo1715

    gibbo1715 New Member

    Many thanks, this gives an error syntax error on line 7 of /etc/apache2/sites-enabled/000-ispconfig.vhost:
    listen requires 1 or 2 arguements
    action '-s' failed

    my file reads as follows

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

    Listen php -q update.php
    NameVirtualHost *:php -q update.php

    <VirtualHost _default_:php -q update.php>
    ServerAdmin webmaster@localhost

    <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>
    <he2/sites-enabled/000-ispconfig.vhost" [readonly] 65L, 1813C 1,0-1

    Im guessing this is probably where my problem is, any help on how to fix this is very much appreciated

    many thanks

    Paul
     
  11. gibbo1715

    gibbo1715 New Member

    I also cant re start apache2 as gives the same error syntax error on line 7 etc

    /etc/init.d/apache2 restart

    Action configtest failed

    My apache error log is empty so that doesnt help me unfortunately
     
  12. gibbo1715

    gibbo1715 New Member

    Would deleting the /etc/apache2/sites-enabled/000-ispconfig.vhost: file cause the system to re create it and maybe solve my issue or would it mean me having to reinstall the whole thing (i.e. make things worse)

    Thanks
     
  13. kwickcut

    kwickcut Member

    i am not 100% but i think this line is wrong

    Code:
     SuexecUserGroup ispconfig ispconfig < 
    try removing the ispconfig from the end see u have it there twice.. hopefully till our falko or someone with a better understanding can help.. i am new myself
     
  14. gibbo1715

    gibbo1715 New Member

    Thanks for the reply kwickcut, appreciate it , i tried that but made no difference unfortunately

    Paul
     
  15. gibbo1715

    gibbo1715 New Member

    All

    can anyone share a copy of what the /etc/apache2/sites-enabled/000-ispconfig.vhost file should look like so i can try and understand what my error is please,

    i only have one test web site so far on my server and happy to re install apache and ispconfig3 if thats a better way but would like to try and fix the file first and not sure if i can even delete everything and start again

    many thanks

    paul
     
  16. kwickcut

    kwickcut Member

    ok this is mine but i am running ubuntu 10.04

    Code:
    VirtualHost configuration:
    wildcard NameVirtualHosts and _default_ servers:
    _default_:8081         xxxxservers.com (/etc/apache2/sites-enabled/000-apps.vhost:10)
    *:8080                 is a NameVirtualHost
             default server xxxxservers.com (/etc/apache2/sites-enabled/000-ispconfig.vhost:10)
             port 8080 namevhost xxxxservers.com (/etc/apache2/sites-enabled/000-ispconfig.vhost:10)
    *:80                   is a NameVirtualHost
             default server xxxxservers.com (/etc/apache2/sites-enabled/000-default:1)
             port 80 namevhost xxxxservers.com (/etc/apache2/sites-enabled/000-default:1)
             port 80 namevhost xxxxxxxxxxxxxxxx.com (/etc/apache2/sites-enabled/100-kikinitonceagain.com.vhost:7)
             port 80 namevhost xxxxbid.com (/etc/apache2/sites-enabled/100-xxxxxxx.com.vhost:7)
    Syntax OK
     
  17. gibbo1715

    gibbo1715 New Member

    Many thanks, looks surprisingly different to mine can anyone help with a debian version please
     
  18. Toucan

    Toucan New Member

    Gibbo, I'll post mine in a mo, but in fairness Ubuntu is based on Debian. Stand by stand by...
     
  19. Toucan

    Toucan New Member

    Also, you have some entries in your system log. You can find it on the control panel on the monitor tab. Can you post entries from there which may help others help.
     
  20. Toucan

    Toucan New Member

    PHP:

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

     
    Listen 8080
    NameVirtualHost 
    *:8080

    <VirtualHost _default_:8080>
      
    ServerAdmin webmaster@localhost

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


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





    Line 7 is most definately different to mine. Mine is listening on port 8080. This does feel typical of badly configured vhost file. Similar symptoms to my mixed secure and non secure site problem causing apache to serve the wrong v host.

    If you do intend to edit your file you can make a copy of it likes this:
    cp 000-ispconfig.vhost 000-ispconfig.vhostcopy
     
    Last edited: Mar 30, 2012

Share This Page