XAMPP PHP with Cloudflare tunnel

I have set up a php app on XAMPP, lets say the address is localhost:8282/pcm

when i use cloudflare tunnel, to have HTTP service and point to localhost:8282, i am able to be directed to the main page of the XAMPP.

But how do i access the pcm folder? i tried putting the ‘pcm’ under path but it doesnt work. i also tried editing the address after it connected to the main page, but still cannot.

what am i doing wrong?

  1. Cut all the default files in the “htdocs” folder.
  2. Create a new folder with any name, for example, “original”. and paste the default files in it.(make sure it is inside of htdocs or your dashboard will not work. you will access the dashboard with “localhost/orignal” . now your htdocs folder should be empty
  3. Paste your “pcm” folder files in “htdocs”. Ensure that “htdocs” is empty and does not contain any other “index.html” file.
  4. Cloudflare will now redirect to your “htdocs” folder, and your PCM project will work.


Cloudflare will only work on the root folder of “htdocs” (as far as I know), specifically at the localhost directory. Therefore, it will not bind to the PCM folder and might redirect to the XAMPP dashboard.
It will only host one project in “htdocs” because multiple HTML files may lead to conflicts.

I hope this helps!