

I assume you’re looking at it using the Preview section of the browser’s Network tools. It is entirely possible that those static files might be served up by the same server that is running your PHP.Īs for the message ‘We’re sorry but cli-ui doesn’t work…’ that you’re seeing, that’s just the default index.html file for a Vue CLI project.


In production you wouldn’t be running the Vue dev server. It looks like the baseURL was being totally ignored but it isn’t clear from the code why that would be. The one thing I still don’t understand is why you were getting a URL of when you’d set a baseURL that includes /api. The target needs to refer to that server, not the Vue dev server. Then in your you need to configure the proxying to forward on the requests to the PHP server. What you have currently should work though I suggest shortening it to baseURL: '/api/'. You currently seem to have code for both, which is unlikely to be correct.įor proxying, the axios configuration needs the baseURL to refer to the Vue dev server. For that you’d either use proxying or CORS. You then need some way for axios, running in the browser, to contact that PHP server. Just putting in your Vue src isn’t going to do anything. You need to put your PHP file somewhere it’ll run. There’s no need for two separate physical servers.
AXIOS DEFAULTS SOFTWARE
When we talk about two servers we mean two software servers.
