Virtual Hosts Templates - How to use them with this configuration.

Discussion in 'Install/Configuration' started by Alex Bolton, Nov 10, 2008.

  1. Alex Bolton

    Alex Bolton Member

    I am currently manually creating virtual hosts when I need them, it does not take me long - but I though to myself "Why not make use of the template feature to make things easier?". However I am having a few problems moving over to them.

    My current setup is like so (keep in mind I am using a virtual private server with dreamhost for this - so my setup might already look a little weird to some of you)
    • LiteSpeed is installed in /home/lenore_lsws/lsws/ so that it has its own user.
    • Each other users web directories are symlinked from their directory (for example /home/user1/domain.tld/ to /home/lenore_lsws/domain.tld/).
    • With the current Virtual Hosts the vh_root is /home/lenore_lsws/, the config file is $VH_ROOT/conf/$VH_NAME_vhconf.xml and the document root is $VH_ROOT/$VH_NAME/
    This would seem fairly straight forward to turn into a template, my only problem is that the "$VH_NAME" variable is required with a template. You cant use a full path like I have with my current Virtual Hosts, so this would not work with my current setup (I'd have to have the document root under an additional directory with the same name as the virtual host - for example /home/lenore_lsws/domain.tld/domain.tld/).

    Any suggestions or comments are welcome. If the worst comes to the worst I will nest the symlink in its own directory as above, but I'd rather avoid that where possible.

    Hopefully I've been clear enough. Thank you in advance folks =3
    Last edited: Nov 10, 2008
  2. mistwang

    mistwang LiteSpeed Staff

    change them to
    VH_ROOT: /home/lenore_lsws/$VH_NAME
    config file: $SERVER_ROOT/conf/$VH_NAME_vhconf.xml
    doc root: $VH_ROOT
  3. Alex Bolton

    Alex Bolton Member

    Heh heh I really am an idiot, thank you mistwang. :rolleyes:

Share This Page