Apache not working quite rght

Discussion in 'Server Operation' started by QPRWinst, Sep 16, 2010.

  1. QPRWinst

    QPRWinst New Member

    Hi all

    I have followed the perfect ubuntu server guide and all is good, except that when trying to access the web site for my domain i always get the default apache web page displayed.

    I have setup the domain in ISPConfig and can see various references to it in /etc/apache2/sites-available/ and in /var/www/ and have replaced the index.html file with my own version but the default is displayed. doesnt seem as if apache is differentiating between sites, just shows the default one.

    Im sure there is a simple answer but being a bit of a ubuntu newbie im a bit stuck. I could just replace the default stuff but that would nulify the ability of hosting more than one site.

    Any help would be greatly appreciated or if anyone could point me in the direction of a guide that shows how to set this up properly that would be good.

    Thanks in advance
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What IP address did you choose for the web site in ISPConfig? Just "*", or is there a specific IP address?
     
  3. QPRWinst

    QPRWinst New Member

    Hi
    Ip address is just *.

    Another quick question. I was pointed in the direction of a guide that explains how to set it up manually (http://www.debian-administration.org/articles/412 it is for debian but I have ben informed that Ubuntu is based on debian?), but i was wondering if that would mess up the ISPConfig stuff or would ISPConfig show the relevant changes? I dont want to get into a position where I have to remember where and how individual things where setup and possibly break things by messing where i shouldnt, if that makes sense?

    Cheers
     
  4. QPRWinst

    QPRWinst New Member

    Gave the guide a go but had errors (below) and no ISPConfig didnt register the changes.



    [email protected]:/etc/apache2/sites-available# a2ensite www.pahc.co.uk
    Enabling site www.pahc.co.uk.
    Run '/etc/init.d/apache2 reload' to activate new configuration!
    [email protected]:/etc/apache2/sites-available# /etc/init.d/apache2 reload
    * Reloading web server config apache2
    [Tue Sep 21 10:08:58 2010] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Tue Sep 21 10:08:58 2010] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Tue Sep 21 10:08:58 2010] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Tue Sep 21 10:08:58 2010] [warn] NameVirtualHost *:80 has no VirtualHosts



    any ideas?
    UPDATE: have reversed out all my changes and its reloading without any trouble again but still not showing anything but default page.
    BTW the index.html page it is actually showing is located at /var/www/
     
    Last edited: Sep 21, 2010
  5. falko

    falko Super Moderator ISPConfig Developer

    Please define your IP addresses in the system settings, and then pick a specific IP for the web site (instead of *).
     
  6. QPRWinst

    QPRWinst New Member

    Many thanks that sorted it straight away.
    Suppose I should go away and read the manual before I post any more silly questions.
    Your help much appreciated.
    Cheers
     
  7. QPRWinst

    QPRWinst New Member

    Um i have a new issue now (seem to be full of them at the moment).

    Added my internet connections PUBLIC ip address (e.g. 92.65.49.63) into system and the correct web page was displayed but now when i try to access webmail i get a 404 not found.

    BUT

    if I change the ip address in the system settings to the servers local LAN ip address (e.g. 192.168.0.100) i can access webmail fine but the apache2 default index.html page is displayed.

    what am i doing wrong?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    You must use the IP address that
    Code:
    ifconfig
    displays. If it is 192.168.0.100 (i.e., you server is in a LAN), Make sure that your router forwards port 80 to your server.
     
  9. QPRWinst

    QPRWinst New Member

    Hi

    Ok I have changed the Server ip address to read the same as what is displayed by ifconfig, i.e. the server LAN address 192.168.0.100.

    That enables the correct web page (http://www.pahc.co.uk) but now I cannot access webmail by any means I can think of (e.g. pahc.co.uk/webmail OR server01.pahc.co.uk/webmail OR 192.168.0.100/Webmail).

    My router and DNS(domain registar = British Telecom) is setup right as I can access pahc.co.uk from the outside world no trouble, just not webmail from inside or outside of the LAN?

    There is another tab that says "Server Config". Am I meant to make changes there?

    Thanks in advance for your continuing help. Cheers
     
  10. QPRWinst

    QPRWinst New Member

    UPDATE:

    Been messing round with various settings and now I get the correct web page when going to pahc.co.uk, and by using http://<my public IP address>/webmail i can access the email as well.

    But to get that I deleted the server IP address and changed the site back to *. Also under System->Interface Config->Mail I put a tick in the box Link to webmail in Mailbox list and also put the word "webmail" into the box marked Webmail URL.

    Also in Sever Config I put a tick in the box for Network configuration and plugged in the various details.

    Dont know if all those changes were strictly needed or even wise but it all seems to work kind of.

    Im happy with that for now.
    Thanks again for all your help!
     

Share This Page