All sites resolve to web root (/var/www)

Discussion in 'Installation/Configuration' started by unsichtbare, Sep 24, 2007.

  1. unsichtbare

    unsichtbare New Member HowtoForge Supporter

    I have installed ISPconfig with, apparently, no problems but all sites resolve to the web root of my system: /var/www . See this at:

    http://www.506birch.com
    http://www.headgallery.com

    Where have I gone wrong?

    -J

    P.S. I posted this earlier in the wrong forum by mistake but was unable to delete or move it. Please excuse the re-post
     
  2. catdude

    catdude ISPConfig Developer ISPConfig Developer

    If you log in to the ISPConfig web interface and click on "Management" in the top menu, then click "Server/Settings" on the left menu, then click on the "Web" tab, what do you have in the "httpd.conf" and "Document Root" fields?

    If you look at the file located at the path in the "httpd.conf" field (in my case, /etc/apache2/apache2.conf), do you have a line that looks like "Include /etc/apache2/vhosts/Vhosts_ispconfig.conf" at the bottom of the file?

    Finally, if you do have that line at the bottom of apache2.conf, if you look in the included file (for example, /etc/apache2/vhosts/Vhosts_ispconfig.conf), what are the DocumentRoots specified for the two domains you mentioned?
     
  3. unsichtbare

    unsichtbare New Member HowtoForge Supporter

    Thanks for the prompt reply!

    httpd.conf = /etc/apache2/apache2.conf
    Document Root = /var/www

    apache2.conf has the line:

    Include /etc/apache2/vhosts/Vhosts_ispconfig.conf

    and the file looks like this


     
    Last edited: Sep 25, 2007
  4. catdude

    catdude ISPConfig Developer ISPConfig Developer

    Ok, now I'm puzzled too. The two lines from the Management screen look fine. The Include line is present in the conf file. And the included file specifies distinct DocumentRoots.

    I think we now need to wait for more insight from other users.
     
  5. unsichtbare

    unsichtbare New Member HowtoForge Supporter

    Could the problem be coming from this portion of my apache2.conf file?

    -J
     
  6. catdude

    catdude ISPConfig Developer ISPConfig Developer

    That looks similar to what I've got in mine, except the "sites-enabled" line looks like:
    Include /etc/apache2/sites-enabled/[^.#]*
     
  7. unsichtbare

    unsichtbare New Member HowtoForge Supporter

    Well,
    I tried adding the control characters at the end of the line and restarting apache, to no avail.
    Then I commented out the entire line: #Include /etc/apache2/sites-enabled/
    and got:

    The requested URL / was not found on this server.

    what's in your /etc/apache2/sites-available/default file?

    -J
     
    Last edited: Sep 25, 2007
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Is your server in a NAT enviroment behind a router? In this case, you will have to use your private IP address and not your public IP for the websites.
     
  9. unsichtbare

    unsichtbare New Member HowtoForge Supporter

    Yes and no. Initially I configured server and ISPconfig for 192.168.55.1 behind the router while my public IP was 24.xxx.xxx.xxx. I enabled port forwarding for all of the needed portd 80,22,443,etc. but the sites were not able to resolve at all: no apache messages, no ping, nothing.
    I then changed the server configuration of ISPconfig to reflect my outside IP, while my /etc/network/network configuration remained 192.168.55.1 and immediatly I was able to log-into ISPconfig from the outside world and sites all began to resolve to the /var/www wrb root, ping, etc.
    Box is down right now, maybe I can bring it up after work tonight at around 6:00 P.D.T.

    -J
     
  10. Spoiler

    Spoiler New Member

    i have the same problem here ... all sites go to /var/www.

    in my case i found the error very quickly ... /etc/apache2/vhosts/Vhost_ispconfig.conf was empty.

    i dont know how this can be.

    There are some other files starting with "Vhost_ispconfig".
    for example: Vhost_ispconfig.c~27-09-07_15-10-29

    I think this file is a backup?

    finaly i copied the latest file to Vhost_ispconfig.conf ... restart of apache puted out an error "php_admin_flag is unknown".
    I deleted this row from Vhost_ispconfig.conf and the restart of apache2 was successful.
    From this moment i get the correct site.

    But: how it can be that Vhost_ispconfig.conf is empty??
     
  11. falko

    falko Super Moderator ISPConfig Developer

    No, it's not a backup, it contains a configuration that makes oyur Apache fail to start, in your case because you don't seem to have the PHP module installed. Install/enable it, and everything should work then.
     
  12. Spoiler

    Spoiler New Member

    yes of course ... php5.conf and php5.load was not linked from mods-available to mods enabled.

    just created this links and every thing is ok ;)

    Thx
     
  13. patfee

    patfee New Member

    how can i manage this:
    because i have the same problem

    thanks
    Patrick
     
  14. Spoiler

    Spoiler New Member

    what system?

    normaly u have to check if the links exist in /etc/apache2/mods-enabled

    just go to the directory and type:
    Code:
    ls -l php*
    My output is:
    if u have no output for php* u have check for the php-modules:
    Code:
    cd /etc/apache2/mods-available
    ls -l php*
    
    should look like this:
    if there is no output too, you have to install the php-modules (look at howto-forge tutorial).

    If the modules are installed, you have to creakte the links.
    Code:
    ln -s /etc/apache2/mods-available/php5.conf /etc/apache2/mods-enabled/php5.conf
    ln -s /etc/apache2/mods-available/php5.load /etc/apache2/mods-enabled/php5.load
    
    Then restart the apache.

    Now apache should start with php support.

    Hope i could help ....
     
  15. davy

    davy New Member


    How can i Install/enable PHP module (what modules)? I am using CentOS 5.1 64 bits.I got a same problems.

    Thanks for help

    davy
     
  16. falko

    falko Super Moderator ISPConfig Developer

    Please try this:
    Code:
    yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc
    Then restart Apache.
     

Share This Page