Add new website - editing default settings

Discussion in 'Installation/Configuration' started by vin551, Sep 10, 2024.

  1. vin551

    vin551 New Member

    Hi,

    how to edit the default settings under the dashboard Websites "Add new website" section ? I have succeeded to change some settings via database table structure defaults, but not all.

    For example, Auto-Subdomain is by default "www." and I'd need it to be "None" by default.

    I checked the database web_domain, in the table structure,the field "subdomain" has the enum values 'none','www','*' and Default is set to "none", these are settings of a freshly installed ISPConfig 3.2.12p1.

    BR,
    vin
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

    Thats hardcoded in the form file at interface/web/sites/form/web_vhost_domain.tform.php
    Code:
        'subdomain' => array (
                'datatype' => 'VARCHAR',
                'formtype' => 'SELECT',
                'default' => 'www',
                'value'  => ($wildcard_available ? array('none' => 'none_txt', 'www' => 'www.', '*' => '*.') : array('none' => 'none_txt', 'www' => 'www.'))
            ),
    
    I guess if you want to modify this behavior you have to manually edit this file.
     
    ahrasis and vin551 like this.
  3. Strontium

    Strontium New Member

    ahrasis likes this.
  4. vin551

    vin551 New Member

    Thank you @pyte! I did try to search for hardcoded settings earlier, somehow I missed this with grep, this worked. I will make an script that will sed this every time the ISPConfig is reconfigured or updated.
     
    ahrasis likes this.
  5. Strontium

    Strontium New Member

    You can also "chattr +i" that file.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    That's not a good idea for code files, in my opinion. It will likely break your system, as the file will soon be incompatible with the rest of the application.
     
    Strontium and pyte like this.

Share This Page