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 Sub-Domain and Additional Static Sub-Domain?

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
20 posts
  • 1
  • 2
  • Next
Gordon55M
Posts: 43
Joined: Tue Apr 22, 2014 8:37 pm
Contact:
Contact Gordon55M
Twitter

Os: Ubuntu 15x
Web: nginx + php-fpm
Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Gordon55M » Tue Aug 19, 2014 8:59 pm

In my current setup, I have a successful WordPress Multisite running with wildcard sub-domains. This is great in that when I add a new site in the WordPress network, it automatically works using the site sub-domain.

Example: *.gordon55m.com points all new WordPress sites to the correct spot.

I now wish to add a Drupal (Open Atrium) site on a sub-domain of that same base domain. Is this possible to do this while keeping the wildcard sub-domain?

Example: intranet.gordon55m.com would point to Open Atrium Drupal whereas *.gordon55m.com would correctly go to the corresponding WordPress site.

What I've Tried: I added the sub-domain under the Web in Vesta. I then added an A Record in the base domain DNS records to point to the server IP address. This didn't work as WordPress still grabbed the sub-domain.

Any suggestions?
Top

Kyon
Posts: 19
Joined: Tue Jul 29, 2014 9:11 am

Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Kyon » Wed Aug 20, 2014 2:08 pm

Hello Gordon55M,

As you create a domain with wildcard before a second domain without it. I think the config files was generated with the wildcard on the first position. So, the web server will read the begin of the config file and every request will match with the wildcard so, it will never read the other one.

I think is there two solutions to try :

- Edit the files in "/home/[username]/conf/web" manually to move the config part with wildcard on the end of the file and restart web servers but this edit can be lost if vesta update the config.

or

- Edit the vesta config file /usr/local/vesta/data/users/[username]/web.conf and move the line with the wildcard to the last position and regenerate the web configs file with the "v-rebuild-web-domains " vesta bin.

Regards,
Last edited by Kyon on Wed Aug 20, 2014 4:33 pm, edited 2 times in total.
Top

Gordon55M
Posts: 43
Joined: Tue Apr 22, 2014 8:37 pm
Contact:
Contact Gordon55M
Twitter

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Gordon55M » Wed Aug 20, 2014 4:00 pm

Kyon, thanks for the quick reply and guidance! I edited the web.conf file as you suggested. At the risk of sounding dumb, how do I regenerate the configs file and execute the "v-rebuild-web-domains " vesta bin?

I tried following the documentation and ran:

Code: Select all

for user in $(v-list-sys-users plain); do v-rebuild-web-domains $user; done
But am unsure of how to regenerate the configs file. Can you help point me in the right direction? My searches didn't turn up anything.

Edit - Should I run?

Code: Select all

for user in $(v-list-sys-users plain); do v-list-sys-config $user; done
Top

Kyon
Posts: 19
Joined: Tue Jul 29, 2014 9:11 am

Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Kyon » Wed Aug 20, 2014 4:30 pm

"for user in $(v-list-sys-users plain); do v-rebuild-web-domains $user; done" seems to be the good one.

It doen't worked ? Did you restart nginx and apache ?

Regards,
Top

Gordon55M
Posts: 43
Joined: Tue Apr 22, 2014 8:37 pm
Contact:
Contact Gordon55M
Twitter

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Gordon55M » Wed Aug 20, 2014 5:00 pm

Kyon, after some fiddling, I got it to work...kind of...

I am now missing the domains under the Web tab in my user area. I've included the image below. Any idea on how to rebuild this domain area in Vesta?

Image
Top

Kyon
Posts: 19
Joined: Tue Jul 29, 2014 9:11 am

Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Kyon » Wed Aug 20, 2014 5:04 pm

What is the return of : v-list-web-domains [the concerned user]
I hope I don't give you bad advise :(.
Top

Gordon55M
Posts: 43
Joined: Tue Apr 22, 2014 8:37 pm
Contact:
Contact Gordon55M
Twitter

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Gordon55M » Wed Aug 20, 2014 5:08 pm

Here is what it returns (I just redacted it):

Code: Select all

DOMAIN                      IP             U_DISK  U_BANDWIDTH  TPL      DATE
------                      ------         ------  ------       ------   ------
subdomain1.url.com  107.XXX.XXX.X  92      0            default  2014-08-19
subdomain2.url.com   107.XXX.XXX.X  127     0            default  2014-08-19
url.com         107.XXX.XXX.X  199     637          default  2014-05-23
Top

Kyon
Posts: 19
Joined: Tue Jul 29, 2014 9:11 am

Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Kyon » Wed Aug 20, 2014 5:14 pm

Woaa strange, I tried to move a line on my vesta conf like i advised and it don't reproduce this issue...

Did you do other edits ?

Did you get a correct result if you use "v-list-web-domains username json" ?
Top

Gordon55M
Posts: 43
Joined: Tue Apr 22, 2014 8:37 pm
Contact:
Contact Gordon55M
Twitter

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Gordon55M » Wed Aug 20, 2014 5:15 pm

Error: USER username doesn't exist
Top

Kyon
Posts: 19
Joined: Tue Jul 29, 2014 9:11 am

Re: Wildcard Sub-Domain and Additional Static Sub-Domain?
  • Quote

Post by Kyon » Wed Aug 20, 2014 5:16 pm

Replace username by the concerned user
Top


Post Reply
  • Print view

20 posts
  • 1
  • 2
  • Next

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