How to disable auto virtual hosts?


  • | 2898 points

    @leokhoa

    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.

    0_1510333264087_upload-48a3fa48-be0b-47a3-9cdf-143eb9b7ba39

    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.
    {ProjectName}.dev.conf
    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

    @bantya:
    It's a bug. I will make a hotfix soon.


  • | 2898 points

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

    0_1510605269512_upload-3d753950-994f-495e-bd6e-679c4b81d6b8

    and Apache is reloaded,

    0_1510605491050_upload-721b0825-d81f-4673-a01a-50d05a63a55c

    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.

    0_1510605841776_upload-ddae9aa7-b4ff-40a2-8fdb-bb5b5314a0d4

    This behavior should also be changed!


  • | 2898 points

    @leokhoa

    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.

    0_1510607242422_upload-cdc9bad5-6541-40e0-a57a-718d544fd74d

    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

    0_1510609109202_upload-f25b5cea-75f2-44b0-b375-7a72b71a34ab

    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

    @leokhoa
    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

    @leokhoa
    Thanks, buddy!
    šŸ‘


Log in to reply
 

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