I have a server with hostname aaa.yyy.com and alias bbb.yyy.com. I have installed Portal 10.5.1 and Web Adaptor 10.5.1 on the server. I have set the WebContextURL and Web Adaptor to bbb.yyy.com. Then I have created some maps and apps on the Portal. Now, the problem is the apps can only be accessed from bbb.yyy.com. If the apps are accessed from aaa.yyy.com, the browser only turns blank. Anyone have ideas?
Portal can only have one "front-end" or "user-facing" URL so all items are expected to be accessed over that URL. That URL is going to be defined by the web adaptor if you haven't set the web context URL or the web context URL regardless if you have a web adaptor or not. You can take a look a the network traffic using the dev tools in your browser or Fiddler to see why the request is failing, but generally, I don't think what you're doing is possible.
Thanks for your reply. In fact, I only need to access Portal from aaa.yyy.com, bbb.yyy.com is no longer used. I have set the web adaptor and web context URL to aaa.yyy.com, but the error message "Please sign in to access the item on https://bbb.yyy.com/arcgis (item)" is shown occasionally. Are there any other config files I need to modify?
You can't update that front-end URL after it's configured. Well, you can, but all existing items will still be set with the old URL. You can update the URL manually for all items within the Sharing API, though:
Update the URL field to point to the correct URL.