Adding vhosts by creating a file?

Discussion in 'Bug Reports' started by Michael.Terence, Feb 5, 2009.

  1. Michael.Terence

    Michael.Terence Active Member

    I could swear I read somewhere that with the 4.0 release you could add vhosts to templates by creating a file on the filesystem - but I can't find it again or any other details about it.

    Have I lost my mind, or has this been implemented? I've been writing my own control panel for my non profit - and have left the addon domain till last in the hopes that I'd be ready to upgrade to 4.0 about the time I started work on it.

    If this has been implemented can you provide me a link to some additional documentation? Will a reload be required to activate the new vhosts? If so, is there any way to reload that by an unprivledged user?
  2. mistwang

    mistwang LiteSpeed Staff

    It has not been implemented.
  3. raphidae

    raphidae Well-Known Member

    Perhaps my solution on adding vhosts using xsh is of use:

    It could easily be adapted to write a seperate config file for each vhost instead of adding vhosts to a template.

    As to your reloading question: lsws needs to be reloaded, I believe this does not interrupt service. You can use sudo to let unprivileged user 'user' reload lsws by adding to sudoers:

    Or you could cron a script that checks for the existence of a file (i.e. 'request_lsws_restart') in users home directories and restarts lsws and deletes the file if present (make sure it is a file! otherwise an user could make it a symlink to /etc/passwd :)).
    Last edited: Feb 23, 2009

Share This Page