Laragon Won't use Root Folder Properly


  • | 1780 points

    For some reason Laragon keeps pointing to a sub folder in the www folder as the root director when it is clearly set to the folder www. I deleted the sub folder that it was pointing to and restarted Laragon and it just goes to the next sub folder and uses THAT as the root directory.

    What information do you need? Apache log file of any sort?


  • administrators
    | 81463 points

    @MightyRufo : What do you mean Root Folder (Document Root or Laragon Root)?
    For Document Root, Laragon has multi Document Root support and you can switch to any Document Root easily.
    You can see current Document Root in Menu > Preferences

    Some pictures will be useful


  • | 1780 points

    I mean document root. Instead of pointing to the www folder where Laragon is set to, Laragon is pointing to a sub folder in the www folder. Yet Laragon IS set to the www. If I remove that sub folder mentioned before, Laragon then points to the next sub folder. This happened randomly and I have since reinstalled Laragon and that didn't help.


  • administrators
    | 81463 points

    As there is no picture or video, I can not help you further.


  • | 1780 points

    I fixed it, had to uninstall and reinstall Laragon.


  • administrators
    | 81463 points

    Cool, I'm glad to hear you've fixed it :)


  • | 1375 points

    Hello. I am very disapointed with Laragon (I wanted to go away from WAMP server to different one alternative).

    I just installed it, everyhing is very simple and smooth, I set the root directory to default folder /www.

    Then I downloaded new PhpMyAdmin and added it. Then imported my project into root folder /www.
    Everything was working OK !!! As I was not able to login under PhpMyAdmin as root to database, I pressed RELOAD button for Apache server in Laragon main screen.

    Then the above described issue appeader automatically ! I was not doing anything else.

    So the issue is the same like MightyRufo user had !
    I have subfolder in my project PhPMailer and others. Even there is the root folder still set to /www, from unknown reason Laragon is pointing to the /www/PHPMailer folder ... I tried reaload, point to the totally new root folder /www1 with no success ... still pointing to the subfolder ...

    As i installed the Laragon few minutes ago and facing the first BIG bug and issue, I don´t want to use it anymore as I don´t know if this happens again in the future suddenly anytime ?

    It looks like this is some BIG BUG so it would be good to fix it !


  • administrators
    | 81463 points

    @alkacik : The post of @MightyRufo was almost 2 years ago. From that time, Laragon have been downloaded hundred thousand times and nobody reported the issue until you.
    So, I guess it might be a bug but not BIG as you thought.

    Could you please show me some images so I can reproduce it? (such as: your directory structure, images show www as Document Root, DocumentRoot value in httpd.conf,...)


  • | 1375 points

    Hello. I just reinstalled Laragon few minutes ago (before you reply) and will see if the issue will appear again ... I want to help you address the issue, that is the reason why I registered and replied to this topic because I can say have some experience with PHP and I am not amateur. I just described what happened to me and it looks completely the same like the user MightyRufo was facing.


  • | 1375 points

    I must say, that after the reinstallation and the same steps - doing nothing with configuration, just changed the ports and added the PHPMyAdmin, now the root is pointing to the /www folder. Not to the /www/PHPmailer subfolder after the import of PHPMyAdmin and Reload of the Apache service.

    I am adding here the screenshots - the structure of my projectc including subfolders
    0_1526548001520_laragon2.jpg

    And here the configuration of the root folder.
    This screenshot is from now, after the reinstallation, when it is working, BUT it was completery THE SAME, when the config was showing that the root folder is /www, but in real it was automatically internally pointing to the random subfolder - in my case to PHPMailer folder which you can see in my project as on of the another subfolders. Again I was not changing the root folder after the first installation, just clicked the Reload button and the PHPMailer folder was automatically choosen like a root folder.
    0_1526548217063_laragon1.jpg

    Sorry for worse picture quality, I am running the remote desktop via my Samsung Galaxy Phone and their app can´t provide better resolution, But the folders are readable ...

    If I will face this issue again, I will let you know ...
    I just wanted to reply because it is not normal, that at least two users were facing exactly the same issue even in my case when I know that I was not touching the root folder configuration - ever worse - the app was still showing root folder /www/ but in real it was /www/PHPMailer.

    Again - I created completely new root folder /www1 and copied my project over there, but the result was the same - app was showing chosen root folder /www1, but it was pointing to the folder /www1/PHPMailer again ...


  • administrators
    | 81463 points

    @alkacik : Nice. I saw your images but they did not provide me:

    1. Where did you install phpMyAdmin?
      It's supposed to be install in C:\laragon\etc\apps\phpMyAdmin
      https://forum.laragon.org/topic/98/tutorial-how-to-add-phpmyadmin

    2. What do you mean Laragon is pointing to the /www/PHPMailer folder?
      Do you know that Laragon uses C:\laragon\www as Document Root by default but you can change it in Menu > Preferences


  • | 1375 points

    @leokhoa

    1. Yes, I istalled it to the C:\laragon\etc\apps\phpMyAdmin like you mentioned.
    2. pointing = uses . It means that even the Document Root was configured to C:\laragon\www (mentioned like /www in previous posts), and I was not changing this config for sure. For some unknown reason (the issue we are discussing here), the Laragon app choosed the different Document Root after I installed phpMyAdmin and clicked Reload button on the Laragon main app window.
      I have figured out by deleting the subfolders from my project, that the Laragon started to use C:\laragon\www\PHPMailer subfolder from my project as a Document Root. It means that when I put localhost:9001 into IE, the webpage was loading from C:\laragon\www\PHPMailer subfolder (not C:\laragon\www) , even the configuration MENU - PREFERENCES was showing, that the Document Root is set to C:\laragon\www. Also when I clicked the button ROOT in the main Laragon app window, the folder C:\laragon\www\ appeared correctly, but the webpage - website was still loading form the C:\laragon\www\PHPmailer folder (but it should load from configured Document Root C:\laragon\www). Do you understand ?

    Note: I also don´t know the reason, why PHPMailer subfolder was choosen by the Laragon, I have another subfolders so I don´t know the reason why just PHPMailer folder ... based on me it was just random process.


  • administrators
    | 81463 points

    @alkacik : Gotchas. If you still have issue, can you provide me the Document Root information in httpd.conf and Menu > Apache > sites-enabled > 000-default.conf?


  • | 1375 points

    @leokhoa
    Sorry, but as I mentioned, I was too quick and reinstalled the Laragon few hours ago (before you started to reply to my messages). Now the issue is not there. I will be using Laragon from now, If it will appear I will let you know.

    If I can say it easily, what what happening to me after the first installation, it was perfectly described by the user who wrote the first sentense of this post:

    For some reason Laragon keeps pointing to a sub folder in the www folder as the root directory when it is clearly set to the folder www.

    This happened to me too, that was the reason why I described in detail my first (unfortunately bad) experience with Laragon. This would be good to fix ... I will see in the future if it will appear again ...


  • administrators
    | 81463 points

    @alkacik : I got it. The issue is hard to find but I will try my best as I don't want newcomers have such bad experience :)
    Thank you for letting me know about the issue.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.