I am developing a php project, having the project files stored on OneDrive so that I can access them from anywhere.
I have set up XAMPP, with a VirtualHost
I've not been able to solve the issue, but I've found a workaround:
With this setup I'm able to run my PHP application, since the project files are not physically located in the OneDrive folder, and the project files are still uploaded and backed up on OneDrive due to the symbolic link.
I think is fixed now (2018-11-26) - Now, sites are working again in OneDrive. I'm sure it was a OneDrive app problem that was fixed recently.
I think you just have to right-click OneDrive's icon in the Notification area, choose Settings > Settings > and uncheck Files on Demand.
Optionally, you can leave that, but just right click the folder in OneDrive that's giving you grief and choose the option to always keep a local copy of the folder.
This bug is not fixed still. After Windows 10 May 2019 Update, the bug reappeared and it's not fixed by Microsoft.