The Perfect Server (Ubuntu 12.04 LTS) points to SquirrelMail login

Discussion in 'Installation/Configuration' started by squirrelmail, Dec 7, 2013.

  1. squirrelmail

    squirrelmail New Member

    Hi,

    I followed these steps to install The Perfect Server - Ubuntu 12.04 LTS (Apache2, BIND, Dovecot, ISPConfig 3), http://www.howtoforge.com/perfect-server-ubuntu-12.04-lts-apache2-bind-dovecot-ispconfig-3.

    Setup
    - Home servername (hostname): linux.mydomain.com
    - Private IP: 192.168.1.132
    - Public IP: 65.123.123.123 (dynamic, provided by ISP)
    - Domain name: mydomain.com (registered via registrant)

    I want to use my perfect server as hosting websites and mails. I'll use my registrant DNS server. I can change the all DNS records myself.

    Installation went smoothly without any problems and ISPConfig, etc... works fine. The guideline was awesome and simple to follow, thanks!

    My problem is that if I try to access my domain (mydomain.com, www.mydomain.com) it will point to squirrelmail login page and not to website root folder. It always point to http://<private ip|public ip|domain.com|mydomain>/src/login.php page, why?

    Where is that redirect rule or how to solve this problem?

    I tried also an other domain. The myotherdomain.com is also registered to me and I changed A record to point my Perfect Server Public IP. If I try to access http://myotherdomain.com it also points/redirects to http://myotherdomain.com/src/login.php page.

    Please help!

    Thanks.
     
  2. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please check your vhost files.
    Is there any Vhost that is defined with ip?
    <VitualHost xxx.xxx.xxx.xxx:80>
    instead of
    <VirtualHost *:80>
     
  3. squirrelmail

    squirrelmail New Member

    Hi,

    I found an other thread, http://www.howtoforge.com/forums/showthread.php?t=59005.

    The problem was due to this vhost rule

    Code:
    <VirtualHost 192.168.1.132:80>
      DocumentRoot /usr/share/squirrelmail
      ServerName webmail.mydomain.com
    </VirtualHost>
    I don't know why. Why this vhost rule will mess up the configuration?

    --- Original guideline

    if you'd like to define a vhost like webmail.example.com where your users can access SquirrelMail, you'd have to add the following vhost configuration to /etc/apache2/conf.d/squirrelmail.conf:

    Code:
    [...]
    <VirtualHost 1.2.3.4:80>
      DocumentRoot /usr/share/squirrelmail
      ServerName webmail.example.com
    </VirtualHost>
    Make sure you replace 1.2.3.4 with the correct IP address of your server. Of course, there must be a DNS record for webmail.example.com that points to the IP address that you use in the vhost configuration. Also make sure that the vhost webmail.example.com does not exist in ISPConfig (otherwise both vhosts will interfere with each other!) ???.

    - I had CNAME record: webmail.mydomain.com to point to mydomain.com
    - mydomain.com points to my public IP of course

    My router will handle port forward from public IP to my private IP: 192.168.1.132.
     
  4. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    The reason is simple:
    Any ip vhost will override all * vhosts.
    So try changing this vhost to *:80 instead of removing it completely.
     
  5. squirrelmail

    squirrelmail New Member

    Aaah... got it. Thanks!
     
  6. squirrelmail

    squirrelmail New Member

    BTW;
    - If I want to access mail via webmail.mydomain.com then I'll need webmail.mydomain.com DNS record, right?
    - If I want to access ISP Config via linux.mydomain.com then I'll need linux.mydomain.com DNS record, or not?

    linux.mydomain.com is my server hostname (FQDN)
     
  7. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes, that's right.
     

Share This Page