How to disable auto virtual hosts?

  • | 2898 points


    Hey there, today I installed Laragon and must say that it is a very handy tool in developer's arsenal. It's just what I expected.

    I have my bunch of projects to be kept in /www directory (41 to be precise). When I imported those projects and started Laragon, it asked me about adding entries in hosts file. Asserting to that it added 41 entries in the hosts file. I certainly don't need my every project to be added to the hosts file, except those which I require. So I removed the undesired entries from hosts file also cleared the unwanted .conf files in {LaragonRoot}\etc\apache2\sites-enabled.


    After unchecking the Auto virtual hosts and reloading the apache, this time it did not populated hosts file with gibberish but again added total 41 auto.
    files in {LaragonRoot}\etc\apache2\sites-enabled folder.

    I just want specified projects to be set as virtual hosts.

    Is this a bug or is there any way to stop this behavior?

  • administrators
    | 66271 points

    @bantya : let me check and get back to you soon.

  • administrators
    | 66271 points

    It's a bug. I will make a hotfix soon.

  • | 2898 points

    When Auto virtual hosts is turned off, the SSL Port 443 of Apache is enabled


    and Apache is reloaded,


    it then floods the {LaragonRoot}\etc\ssl directory with .key and .cert files for literally all of the folders I have inside the Document root directory.


    This behavior should also be changed!

  • | 2898 points


    Following is just a concept of the next big release of Laragon.

    Often times we create some projects which are simple or which do not require the database / virtual host / SSL certificates, these times one should be able to choose what we want and what not.

    When the Auto virtual hosts is disabled, the Quick create prompt should ask whether we want a virtual host and/or SSL certificates or not.


    When the Auto virtual hosts is enabled, the Quick create prompt should not display the first two checkboxes.

    Out of the box, Laragon does the excellent job of creating the database for us while creating a new project (even Blank ones), which gets us started in no time. I personally have created many projects (with Laravel also) where I did not require the database support at all. With current Laragon setup for every new project I create, a new database is created.

    So I think just like Auto virtual hosts, there should be a setting called Auto Databases


    If Auto Databases is unchecked, the Quick create prompt (at least for Blank projects) should ask about the database else not.

    And yes, I can imagine some situations where it may conflict with systems like Wordpress, Joomla which compulsorily require a database. So this setting should not be applicable to such systems where it should create a database irrespective of the current status of Auto Database setting.

  • administrators
    | 66271 points

    @bantya : Many thanks for your suggestion. They are really helpful.
    The issues will be fixed soon :)
    For Auto Databases, we can change the behavior by:

    1. Clicking Menu > Quick create > Configuration...
    2. Changing AutoCreateDatabase to false

  • | 2898 points

    Thanks for the AutoCreateDatabase tip, this saved my day.
    Can you please add another category Feature Requests in the forum along with Announcements, Help wanted etc.
    This would be great for suggesting improvements and features.

  • administrators
    | 66271 points

    @bantya : It's done :)

  • | 2898 points

    Thanks, buddy!

Log in to reply

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