I usually, run a separate Sitecore Website(D:/Websites) rather than OOTB installed Sitecore Website (Inetpub/wwwroot) in IIS . I started doing this believing it will be helpful during Sitecore upgrade and few other reasons.
I would move the website folder to a different drive and configure IIS Website from that root folder. Up until 8.2 we would just move the website folder and data/database and the website folder would be copied to a new location and the new local site would be setup easily.
But, after the introduction of Xconnect and Identity Server, the website folder, it’s host name and other stuffs has some dependency over Xconnect and Identity Server. I am sharing my experience over setting things in my local while creating a separate website folder under a different hostname. Different Sitecore Website folder with single/same Identity Server and Xconnect Component. This practically can come into picture under different architectural scenarios. Multiple CDs and Single CMs/Single XConnect.
So, once the website folder is copied to a new location and the IIS Site is configured from this folder, I was able to access the website and the Sitecore control panel. But, the problem was analytics components – Experience Analytics, Analytics Dashboard etc didn’t function as excepted.

While checking the logs I cam across the exception,
Exception: Sitecore.Analytics.DataAccess.XdbUnavailableException
Message: xDB unavailable
Source: Sitecore.Analytics.XConnect
at Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider.ExecuteWithExceptionHandling[T](Func`2 func)
at Sitecore.Analytics.XConnect.Diagnostics.PerformanceCounters.OperationPerformanceMonitorExtensions.Monitor[T](OperationPerformanceMonitorBase monitor, Func`1 operation)
at Sitecore.Analytics.XConnect.DataAccess.Dictionaries.XConnectDeviceDictionary.LoadAs[T](Object key)
at Sitecore.Analytics.DataAccess.Dictionaries.AverageCounterExtensions.MeasureMilliseconds[T](AverageCounter counter, Func`1 func)
at Sitecore.Analytics.DataAccess.Dictionaries.ReferenceDataDictionary`2.Get(TKey key, LookupStrategy strategy)
at Sitecore.Analytics.Pipelines.EnsureSessionContext.EnsureDevice.LoadDevice(Guid deviceId)
Which finally had,
Nested Exception
Exception: System.Net.WebException
Message: The request was aborted: Could not create SSL/TLS secure channel.
Source: System
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
I understood that this is related to Xconnect and SSL/TLS are certificate related issues. If you want to know more about this you find them here.
So to fix this, we need add the necessary permissions to the Site’s AppPool.
To Elaborate , in my local, xconnect.collection key is configured to https://sc931xconnect.dev.local

Now, access the corresponding Xconnect Site folder and make sure your website folder’s App Pool has access to it.

Also, make sure that the App Pool has access to certificate this Xconnect Site. You can check them using MMC Console Right Click on the Certificate -> All Tasks -> Manage Private Keys..


Once, this is done, Voila!!

More details can be found on this Sitecore Stack Exchange post.