Hosting files from a different directory
I've just moved over from antiquated XAMPP looking for an easier solution to locally hosting my web projects.
I have Laragon up and running installed on my
C:drive, but all my projects are in different directories and not in
For example, I might have projects in the following locations:
What I would like to do is to be able to navigate to
localhostin my browser and see a list of all these projects. I know this is possible with XAMPP but over complicated. How would I go about this with Laragon?
Welcome to Laragon! I "found" Laragon over a year ago after trying XAMPP and WAMP and have never looked back.
Laragon "magic" best happens, automatically, from a common root folder. Using your example, if you have all your projects in
project3as subfolders. Set Laragon > menu > preferences > data folder:
D:\users\me\www\. Then Laragon will automatically create the host alias
project3.test, and add them to the host file. To navigate to the project open Laragon and start all, then from Laragon menu > www > choose the project to open in your browser.
If you want to keep your projects in their current folders, then explore
C:\laragon\etc\apache2\sites-enabled\, you should already see
auto.project1.test.conf, copy this file and paste a couple of copies, rename them e.g.
manual.project3.test.conf, edit them and change them for each proejct e.g.
Next, You will need to edit your
hostsfile, (Laragon > H) and manually add the projects:
They will then be available by browsing to
project3.testin your browser.
If you want to navigate to the projects from localhost: edit
C:\laragon\www\index.phpand add a link to each project, maybe create a list.
I hope this helps.