How to add wild card subs

  • I need to be able to run one of my domain names with wild card subs but *.domain doesn't work and I couldn't find anything about it on the forums. Any ideas anyone?

  • Hi,


    first of all, you need to think about using it for only one website or multiple (all) hosted site on this special server.


    You can have a look at /etc/apache2/sites-enabled -> here you can edit the domain settings - this changes are to be overwritten on any changes for that domain in i-mscp!


    Or you can add that (I prefer using this option) in some kind of hidden folder (I am joking)


    Code
    1. /etc/apache2/imscp


    or, if you want it for ALL (future and changed) Domains




    you may want to change


    Code
    1. /etc/imscp/apache/parts/*.tpl


    to look like this:



    Code
    1. <VirtualHost {DOMAIN_IP}:80>
    2. ServerAdmin webmaster@{DOMAIN_NAME}
    3. ServerName {DOMAIN_NAME}
    4. ServerAlias www.{DOMAIN_NAME} {ALIAS}.{BASE_SERVER_VHOST} *.{DOMAIN_NAME}

    Regards
    Joe

  • Hi Jo, thanks for your response. I need wildcard sub-domains for one domain only, and it's not my main domain. So far I've had no luck in configuring this and was wondering if you could be a bit more specific?
    I've tried editing /etc/apache2/sites-enabled/domain.conf but with no joy.
    So I tried etc/apache2/imscp/domain.conf, again to no avail.
    Is there something I'm overlooking?

  • you did a restart of your apache, right?


    Code
    1. service apache2 restart
    Code
    1. ServerAlias www.domain.com vu2005.maindomain.com *.domain.com

    in your /etc/apache2/sites-enabled/domain.conf it should really do the trick.


    BTW: You are using i-mscp 1.2.2? How about an update? The 1.2.9 is absolutely perfect working.


    Regards
    Joe

  • Yes, I edited exactly as you have above and restarted apache, but it's still not working.t use
    Little bit baffled, any ideas?
    ps: I'm using 1.2.7. I had tried 1.2.9 but went back to 1.2.7 for some reason that I forget right now!


    Just remembered why I didn't use 1.2.9. It wouldn't install. Although I had the right OS it kept telling me I didn't have a compatible operating system and could not continue with the install. I changed my OS to every compatible one, and it kept giving the same error, so I went back to 1.2.7.

    Edited once, last by hostquota: to add more detail ().