The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CNAME Problem Cannot redirect properly

Discussion in 'General Discussion' started by mohdyasar, Feb 24, 2008.

  1. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    I have launched a new webmail system called wmail.myweb.com

    i have 3 websites on the same server called
    abc.com
    def.com
    ghi.com

    I am using cpanel 11

    I have created cname for wmail.abc.com to pint to wmail.myweb.com

    What I want is wmail.myweb.com to be used as a standard webmail across all domains.

    I tried to do that, but it actually gives me the server default page which resides on the IP of wmail.myweb.com

    Can someone guide as to anything needs to be done on website wmail.myweb.com

    Thanks
     
  2. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Someone Please help

    Please help any one.
     
  3. johnmigen

    johnmigen Active Member

    Joined:
    Jan 19, 2008
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Put this in your apache pre include
    <VirtualHost 123.123.123.123:80>
    ServerName wmail.*
    ServerAlias wmail.*
    ProxyPass / http://wmail.myweb.com/
    ProxyPassReverse / http://wmail.myweb.com/
    </VirtualHost>


    or


    <VirtualHost 123.123.123.123:80>
    ServerName wmail.*
    ServerAlias wmail.*
    DocumentRoot /home/username/public_html
    </VirtualHost>

    changing the documentroot to the webmail location on your server
     
  4. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Re:

    Dear johnmigen

    Thanks for your reply, but I did not understand the part "Put this in your apache pre include"

    Do I have to put it in the httpd.conf file, simply, or something special, please advise.

    Thanks
     
  5. johnmigen

    johnmigen Active Member

    Joined:
    Jan 19, 2008
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Yup, place this in your httpd.conf or for simplicity, go to your whm, under apache setup, include, preinclude. Then it will do the rest for you.
     
  6. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Re:

    Hi

    I did try it

    1. If a try the following the page does not open
    <VirtualHost 123.123.123.123:80>
    ServerName wmail.*
    ServerAlias wmail.*
    ProxyPass / http://wmail.myweb.com/
    ProxyPassReverse / http://wmail.myweb.com/
    </VirtualHost>

    2. I get internal server error when i try the below:
    <VirtualHost 123.123.123.123:80>
    ServerName wmail.*
    ServerAlias wmail.*
    DocumentRoot /home/username/public_html
    </VirtualHost>

    Can you suggest something
     
  7. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Re:

    I am doing it through WHM, does that make a difference
     
  8. johnmigen

    johnmigen Active Member

    Joined:
    Jan 19, 2008
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    For 1 to work, you need to install mod_proxy

    For 2, if you run suphp you might need to place additional parameters inside the virtualhost, refer to your httpd.conf for samples of virtualhost created by apache, replicate the virtualhost and make amendments to suit your requirement.
     
  9. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Re:

    Hi

    I am use suphp, I tried it does not go through can you please write me teh entry which would go with suphp, also I will not be able to install mod_proxy as well.

    Please advise.
     
  10. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Re:

    Hi there, did you find some time, to answer my query, most appreciated if you could.

    Thanks...
     
  11. johnmigen

    johnmigen Active Member

    Joined:
    Jan 19, 2008
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    To install mod_proxy, you can use apache update to install. Once you are all set, then you add these entry:

    <VirtualHost 123.123.123.123:80>
    ServerName wmail.*
    ProxyPass / http://wmail.myweb.com/
    ProxyPassReverse / http://wmail.myweb.com/
    <IfModule mod_suphp.c>
    suPHP_UserGroup username username
    </IfModule>
    <IfModule !mod_disable_suexec.c>
    User username
    Group username
    </IfModule>
    </VirtualHost>
     
    #11 johnmigen, Mar 21, 2008
    Last edited: Mar 22, 2008
  12. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Re:

    Hi Thanks for the reply

    Can you tell me how whats
    vodien vodien i did not get that
     
  13. johnmigen

    johnmigen Active Member

    Joined:
    Jan 19, 2008
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Sorry, my mistake, change those values to your username. Those are mine.
     
  14. mohdyasar

    mohdyasar Active Member

    Joined:
    Jun 27, 2004
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Re:

    Thanks for the update

    But could you tell me how do i find out mod_proxy is installed with my apache is there a quick way to find out, please advise.
     
Loading...

Share This Page