need webmail.domain.com --> domain.com/webmail

Discussion in 'Installation/Configuration' started by ngoyette, Oct 5, 2011.

  1. ngoyette

    ngoyette New Member

    hello,

    i would like to be able for all my domain to be able to type webmail.domain.com to redirect to /webmail/ for squirrel..


    i already created a CNAME webmail.domain.com now how do i tell ispconfig to make a redirect?


    thank you
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Add a subdomain or aliasdomain for webmail.domain.com and then create a redirect to http://domain.com/webmail on the redirect tab.
     
  3. ngoyette

    ngoyette New Member

    thank you . this is what i tried! and it give me the green page "welcome to your website"

    here is my config :
    [​IMG]

    and my redirect:
    [​IMG]

    note that i se google for testing only ...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You have added a website and not a aliasdomain or subdomain. Delete the website and then add a alisasdomain or subdomain instaed.
     
  5. ngoyette

    ngoyette New Member

    for some reason, when i config this:
    [​IMG]

    i get :

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

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
    ------

    even if i change http://mail.lburgoyne.ca/webmail/ to http://mail.lburgoyne.ca/webmail or http://www.google.ca or http://www.google.ca/

    ....

    thank you!!!


    edit: also i see nothing in the /var/log/lburgoyne.ca error or access log ...
     
    Last edited: Oct 6, 2011
  6. ngoyette

    ngoyette New Member

    also created a new site test.lburgoyne.ca with redirect ... still nada :(
    now it show :
    It works!

    This is the default web page for this server.

    The web server software is running but no content has been added, yet.
     
  7. eko_taas

    eko_taas New Member

    tried and got it right....

    So your http://xxxxx.yyy/webmail is working when dir. addressed?

    To test your problem on my server1 I just added in ISPConfig 3.0.3.3
    Sites / Aliasdomain for website / Add new aliasdomain

    Domain: mail.example.com
    Parent Website: ftp.example.com (any existing one is working, so pick up one)
    Redirect Type: R
    Redirect Path: https://example.com:8080/webmail
    Auto-Subdomain: none

    Active: (selected)

    Note: I have extended with ssl my squeeze-server with ssl so https:// needed
    - ISPConfig manual and
    - http://www.howtoforge.com/extending-perfect-server-debian-squeeze-ispconfig-3 (only partlly applied)

    now whem making request http://mail.example.com or just mail.example.com I will be redirected to https://example.com:8080/webmail

    No need to create new sites etc. due this (at least in my case)

    I hope some help (even if guru already answered more accurate way...)
     
    Last edited: Oct 11, 2011
  8. eko_taas

    eko_taas New Member

  9. ngoyette

    ngoyette New Member

    this exactly what im doing + cname of course this is why its confusing ... there is maybe a problem with my ispconfig config?

    look at what i did:
    [​IMG]

    full dns record for domain im working on:
    [​IMG]

    alias sub domain in sites:
    [​IMG]

    something i did was wrong? because the redirect doesnt work :(
     
  10. eko_taas

    eko_taas New Member

    As I have understood (and done) there is no need to do anything on DNS-side on your org. need... At least on my system, where only one server ("server1") in ISPConfig-system.

    Actually I have had no need to change DNS-settings till today (several sites, domains pointing to same IP-address).

    As newbee just happy as working :) w/o understanding on details :eek:
     
  11. ngoyette

    ngoyette New Member

    you mean that ispconfig is auto configuring dns with the alias?
    because if x.domain.com is not registered in the dns nobody outside can ask for this subdomain " x " because it doesn't exist on the outside world ....its really weird..
     
  12. ngoyette

    ngoyette New Member

    even if i create any web site in the sites > Websites

    and i got on the redirect tab , and do a redirect to google....

    well it give me a "Welcome to your website!" on green text page... this make no senses at all...

    i think something is broken on my ISPconfig ... how can i repair this?
     
  13. eko_taas

    eko_taas New Member

    an other test...

    I have several (testing) websites on my test-server (only sites created, no DNS changes):
    example.com (pointing to my public IP)
    www.example.com
    ftp.example.com
    Dyndns (updated by DynDNS client http://dyn.com/support/clients/linux/ )
    abc.dyndns-ip.com

    And when tested alias as told before, all w/o any manual changes on DNS (on terminal or ISPConfig) (as I can recall of :rolleyes:).

    I made an other test (to point to outside world as well)
    new alias: howto.example.com, rederect, http://www.howtoforge.com, None, active
    wait for 1 min (for ISPConfig update) and Vola (works like a dream acc. to test...
    http://howto.example.com or pure howto.example.com ==>> http://www.howtoforge.com/

    Checked also that no new automarking ISPConfig DNS-records. Looks to me that not needed.
     
    Last edited: Oct 11, 2011
  14. ngoyette

    ngoyette New Member

    this make no sense ....

    i tried CNAME:
    webmail
    lburgoyne.ca.

    i tried A record:
    webmail.lburgoyne.ca.
    64.15.130.185

    no change in problem..


    then in the website i created aliasdomain:
    parent website: lburgoyne.ca
    webmail.lburgoyne.ca
    L,R
    http://www.google.ca
    auto-subdomain none

    also tried subdomain for a website ... doesn't work ..


    now does this mean i will have to create a subdomain and add an .htaccess to the website for redirection?
     
  15. ngoyette

    ngoyette New Member

    funny thing is that when i edit :
    /etc/apache2/sites-enabled/100-lburgoyne.ca.vhost

    and add

    <VirtualHost *:80>
    ServerAlias webmail.*
    RewriteEngine On
    RewriteLog "/var/log/apache2/rewrite.log"
    RewriteLogLevel 3
    RewriteCond %{HTTP_HOST} ^webmail\.(.+) [NC]
    RewriteRule (.*) http://mail.%1/webmail/ [R=301,L]
    </VirtualHost>

    it works.....


    so what is wrong with isp config???
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The redirect that eko_taas described in this thread works fine, I use it on several servers. So there is nothing wrong with ispconfig. Maybe you did not wait until the changes were written to disk as you tested it or there was a typo in your settings.

    What you did now is something different as you added a new wildcard vhost and not just a redirect, there are always a lot of ways to achieve a specific behaviour with apache rewrites and redirects. The only thing that you should change is that you add your new vhost in its own vhost file and not the file /etc/apache2/sites-enabled/100-lburgoyne.ca.vhost, as your current changes will get removed automatically from /etc/apache2/sites-enabled/100-lburgoyne.ca.vhost
     
  17. ngoyette

    ngoyette New Member

    how much time should it take for change to be writen to disk?

    i will give you access to admin on my ispconfig if you need to....... im pretty sure i followed instruction to the letter ..
     
    Last edited: Oct 17, 2011
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Normally it takes about one minute.

    I can check that on your server, but remote login support is not free. So if you like that one of your admins checks your system, please contact us here:

    http://support.projektfarm.com/
     
  19. ngoyette

    ngoyette New Member

    i understand,

    so

    if i have : DNS :
    [​IMG]

    and : ALIAS :
    [​IMG]

    typing web.lburgoyne.ca should redirect me to http://mail.lburgoyne.ca/webmail right?


    but i still get:
    [​IMG]
    after 2 days... still...\



    so is there something wrong in my config??
     
  20. eko_taas

    eko_taas New Member

    no need to edit your DNS as ISPConfig will do automatically (at least in my case).

    If you delete all DNS settings (manually done by you), does it work (like in my case)
     

Share This Page