Skip to main content
We are aware of an issue with a recent Apache update that causes proxied sites to return a "421 Misdirected Request" error. Please see the following article for more information and updates:
Websites show 421 Misdirected Request error while using EA Nginx

Can't get personalization API to set default webmail app

Comments

3 comments

  • swbrains
    While debugging this further, I changed my app to manually create the nvdata folder, but it failed to create it (said it already existed but it didn't). So I created it manually from SSH (as root). I then updated my script to manually create the user@domain_default_webmail_app file, but it failed saying "permission denied." I manually chown'd the nvdata folder to the user account's user ID and then my script could create the default_webmail_app file in the folder. So it appears there is some issue with permissions creating the nvdata folder at first, and my guess is that the API is hitting that issue. I'm just not sure why it works on the production server and not on the new server. Perhaps it is related to how the user account was created in the first place. On the production server, it was created under a reseller account that I don't have on the new server yet. I just did a backup of a test account on the production server and moved it to and restored it on the new server, so perhaps that causes some permission to be different some place...
    0
  • cPRex Jurassic Moderator
    Hey there! On my system, the SSH command creates a file named email@domain.com_default_webmail_app inside /home/cptest2/.cpanel/nvdata, so that seems to be working well on my end. I did change the username in your example from "root" to the specific cPanel account in question. As far as the token, it might be time to switch from tokens instead of a user/pass in the API call: How to Use cPanel API Tokens | cPanel & WHM Documentation
    0
  • swbrains
    Thanks. I have figured out that the "file exists" error when creating the folder was a typo. After that, I can create the nvdata folder in my script. But then I let the script continue to try to use the API and it still fails. If I manually write out a default_webmail_app file with "roundcube" in it, it works to send the user to the roundcube inbox right after login. But I will continue to debug further to try to get the API working as I would prefer that method... Thanks for your suggestion and I will check out tokens and see if it makes a difference.
    0

Please sign in to leave a comment.