Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Service Redirect Failing even if hard coded

Discussion in 'EasyApache' started by Joshua Brixey, Jan 30, 2019.

  1. Joshua Brixey

    Joshua Brixey Member

    Joined:
    Jan 30, 2019
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russellville, AR
    cPanel Access Level:
    Root Administrator
    I am trying to redirect webmail.site.com to webmail.site.com:2096 which should have happened automatically based on the server settings. However, it does not redirect and I get a cPanel CGI error page with no error code. I have tried using a rewrite .htaccess in public_html and it is completely ignored. The same .htaccess file works fine under the site folder but that doesn't help as that is a subdomain mailserver.site.com.

    I have tried to check the settings and I am not sure what I am missing. I have tried disabling the builtin service redirect with no success.

    P.S. The forums captcha needs a lot of work... I had to get one with a number answer before it was accepted even though the answer should have been correct every time (airplanes and automobiles).
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,916
    Likes Received:
    486
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You only type in the missing letters, not the full word. ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Joshua Brixey

    Joshua Brixey Member

    Joined:
    Jan 30, 2019
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russellville, AR
    cPanel Access Level:
    Root Administrator
    That makes sense now, I didn't see that mentioned anywhere though. Still, need to figure out while the rewrite in .htaccess isn't working though...
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    482
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Joshua Brixey


    Im not sure I understand what is going on here, cPanel's service subdomains (formerly this was called "Proxy Subdomains") should be handling this already. Pending service subdomains are enabled when you access webmail.domain.tld you should be taken to the webmail UI. There should be no need to add an.htaccess redirect for this.

    Please see our documentation on this here: Service Subdomains Explanation - cPanel Knowledge Base - cPanel Documentation
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Joshua Brixey

    Joshua Brixey Member

    Joined:
    Jan 30, 2019
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russellville, AR
    cPanel Access Level:
    Root Administrator
    Yes, that was my understanding as well! I believe it was working like that at some point but one of the recent updates seem to have caused it to quit. I checked the settings and it is enabled, I tried to force it by adding the .htaccess rules but still without any success.
     
  6. Joshua Brixey

    Joshua Brixey Member

    Joined:
    Jan 30, 2019
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russellville, AR
    cPanel Access Level:
    Root Administrator
    Tired of the "spam" errors that keep me from editing a post... Anyway, I had originally attempted to use the .htaccess rules to redirect all queries to the webmail login as this server is only used for email. However, that never worked for whatever reason... even though the rules and syntax was correct (again, this works on the same server when used on whm url settings).
     
  7. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    482
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Joshua Brixey


    1. You're not able to edit posts as we limit that ability until you've posted a certain number of times - this and other limitations are discussed here: https://forums.cpanel.net/threads/changing-options-on-forums.208912/
    2. For the webmail redirect, we do not recommend circumventing the service subdomains, instead, I'd like to see if we can help you fix them. Can you tell me what the output of the following is?
    Code:
    /scripts/servicedomains add --domain=domain.tld

    Change domain.tld to your domain when you run it but please remove any identifying information when you add it to your response here.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Joshua Brixey

    Joshua Brixey Member

    Joined:
    Jan 30, 2019
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russellville, AR
    cPanel Access Level:
    Root Administrator
    Thanks for your reply! The following is the result I got when I ran that code (I first changed the command to --domain=mysite.org). The following is the result, it didn't seem to do anything to fix my problem (was it supposed to do anything?).

    mysite.org [ADD:A@webdisk:myip, ADD:A@cpanel:myip, ADD:A@cpcalendars:myip, ADD:A@cpcontacts:myip, ADD:A@whm:myip, ADD:A@webmail:myip]
     
  9. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    482
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Joshua Brixey


    It looks like it added A records for all of those items including webmail. If you try and look for the A record do you get a response?

    Code:
    dig a webmail.yourdomain.tld
    before testing this did you remove any .htaccess redirects that would affect the webmail subdomain? Also is DNS for the domain hosted locally (meaning do your nameservers point to this server)?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Joshua Brixey

    Joshua Brixey Member

    Joined:
    Jan 30, 2019
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russellville, AR
    cPanel Access Level:
    Root Administrator
    Nameservers are hosted 3rd party as the domain is split across two different servers. The webmail subdomain is setup to point to this server.

    I double checked and the dig command did get the correct result (from the 3rd party nameservers)

    I renamed the .htaccess files and still have the same issues.
     
    #10 Joshua Brixey, Feb 4, 2019
    Last edited: Feb 4, 2019
  11. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    482
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Joshua Brixey


    It sounds like the A record for webmail isn't functioning properly in that case - if you ping it do you get a response? If you'd like at this point I'd like to see if you can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved. This way we can look at the actual domains and see what the DNS configuration is.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Joshua Brixey

    Joshua Brixey Member

    Joined:
    Jan 30, 2019
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russellville, AR
    cPanel Access Level:
    Root Administrator
    The webmail subdomain is pingable and the correct server responds. I think the issue is caused by cpanel assuming that the entire domain is/should be hosted on that server when in actuality it is not (only mail services are hosted there).
     
  13. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,262
    Likes Received:
    482
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Joshua Brixey


    Though it is sort of that issue, it should still be able to function if the webmail. subdomain points to the server and the proxy subdomains are enabled.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Joshua Brixey

    Joshua Brixey Member

    Joined:
    Jan 30, 2019
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Russellville, AR
    cPanel Access Level:
    Root Administrator
    Just reporting back. I did get someone and it helped to work through some of the possibilities, however, the root issue with the URL rewrite was still a problem. Rather than continue working with it as this time, I went ahead and used a different subdomain where I was allowed to use URL rewrite as it was not a system reserved subdomain. It's not perfect but I will settle for it.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice