Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Wildcard subdomains

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
aleman_gc
Posts: 1
Joined: Sun Apr 05, 2015 4:17 pm

Wildcard subdomains
  • Quote

Post by aleman_gc » Sun Apr 05, 2015 4:53 pm

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
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Wildcard subdomains
  • Quote

Post by skurudo » Tue Apr 07, 2015 1:45 pm

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 ;-)
Top

Katronix
Posts: 9
Joined: Tue Feb 02, 2016 3:54 pm

Re: Wildcard subdomains
  • Quote

Post by Katronix » Tue Feb 02, 2016 3:58 pm

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.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Wildcard subdomains
  • Quote

Post by skurudo » Wed Feb 03, 2016 11:03 am

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/
Top

Katronix
Posts: 9
Joined: Tue Feb 02, 2016 3:54 pm

Re: Wildcard subdomains
  • Quote

Post by Katronix » Wed Feb 03, 2016 7:50 pm

skurudo wrote:Soon we re-open bugtracker and you can add new idea -> https://bugs.vestacp.com/
Seems the bug tracker is closed.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Wildcard subdomains
  • Quote

Post by skurudo » Thu Feb 04, 2016 7:17 am

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.
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: Wildcard subdomains
  • Quote

Post by dpeca » Wed Apr 12, 2017 3:12 pm

Just to confirm that skurudo's example works :)
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Wildcard subdomains
  • Quote

Post by skurudo » Thu Apr 13, 2017 7:43 am

thanks dpeca for testing those ;-)
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password