Page 1 of 1

Wildcard subdomains

Posted: Sun Apr 05, 2015 4:53 pm
by aleman_gc
hello,
i am very satisfied with vesta.
Burt a have a question:
how can a assign wildcard-Ssubdomains?
an alias line '*.mydomain' not works!
i needed, because our clients have to call our site with her partner-ID
example: 344.mydomain.com
naturally i can't create a individual subdomain for each partner!
the A-records for '*.domain' arr defindes correctly
thanks


hallo
Ich bin ja mit Vesta rundum zufieden.
Aber habe eine Frage:
Wie lege ich zu einer Domain "Wildcard"-Subdomains an.
Ein Alias "*.domain" wie http://www.domain functioniert nicht.
Grund, Partner rufen eine domain mit partnerid.domain auf.
und ich kann nicht fuer alle Parnter eine eigene Subdomain anlegen.
Die A-Records fuer '^*.domain sind korrekt definiert
Gruss

Re: Wildcard subdomains

Posted: Tue Apr 07, 2015 1:45 pm
by skurudo
In default way answer will be no ^_^

But you can use non-default way and wildcard subdomain for apache2:

Code: Select all

<VirtualHost *:80>
  DocumentRoot /var/www/wildcard
  ServerName other.example.com
  ServerAlias *.example.com
</VirtualHost>
and nginx can do it too:

Code: Select all

server {
  server_name example.com www.example.com;
  root www/pub;
}

server {
  server_name ~^(.*)\.example\.com$ ;
  root www/pub/$1;
}
PS: It's examples, not tested ;-)

Re: Wildcard subdomains

Posted: Tue Feb 02, 2016 3:58 pm
by Katronix
How hard would this be to add to a 'wish' list for the panel? This is one of the cases of 'everyone else' does it.

Re: Wildcard subdomains

Posted: Wed Feb 03, 2016 11:03 am
by skurudo
Katronix wrote:How hard would this be to add to a 'wish' list for the panel? This is one of the cases of 'everyone else' does it.
Soon we re-open bugtracker and you can add new idea -> https://bugs.vestacp.com/

Re: Wildcard subdomains

Posted: Wed Feb 03, 2016 7:50 pm
by Katronix
skurudo wrote:Soon we re-open bugtracker and you can add new idea -> https://bugs.vestacp.com/
Seems the bug tracker is closed.

Re: Wildcard subdomains

Posted: Thu Feb 04, 2016 7:17 am
by skurudo
Katronix wrote:Seems the bug tracker is closed.
Yeah, wait a little longer and it'll be open.
We transfer content now, it's manual work unfortunately.

Re: Wildcard subdomains

Posted: Wed Apr 12, 2017 3:12 pm
by dpeca
Just to confirm that skurudo's example works :)

Re: Wildcard subdomains

Posted: Thu Apr 13, 2017 7:43 am
by skurudo
thanks dpeca for testing those ;-)