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

Subdomain redirects to main site

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
3 posts • Page 1 of 1
HenrysCat
Posts: 51
Joined: Sun Mar 25, 2018 7:25 pm

Os: CentOS 6x
Web: apache + nginx
Subdomain redirects to main site
  • Quote

Post by HenrysCat » Fri Jun 14, 2019 8:16 am

I have created a subdomain test.mydomian.com but it loads the site from the public_html of mydomain.com.

DNS in managed externally by namecheap so I created a CNAME record there, host = test, value = mydomain.com, added the subdomain in vestacp under WEB then add web domain, did I miss anything?

Thanks all
Top

linuxman
Posts: 47
Joined: Tue Jun 04, 2019 12:56 pm

Os: Debian 8x
Web: apache + nginx
Re: Subdomain redirects to main site
  • Quote

Post by linuxman » Tue Jun 18, 2019 8:22 am

HenrysCat wrote: ↑
Fri Jun 14, 2019 8:16 am
I have created a subdomain test.mydomian.com but it loads the site from the public_html of mydomain.com.

DNS in managed externally by namecheap so I created a CNAME record there, host = test, value = mydomain.com, added the subdomain in vestacp under WEB then add web domain, did I miss anything?

Thanks all
For subdomain test.mydomian.comyou need yo add A record not CNAME.
Top

linuxman
Posts: 47
Joined: Tue Jun 04, 2019 12:56 pm

Os: Debian 8x
Web: apache + nginx
Re: Subdomain redirects to main site
  • Quote

Post by linuxman » Tue Jun 18, 2019 8:27 am

linuxman wrote: ↑
Tue Jun 18, 2019 8:22 am
HenrysCat wrote: ↑
Fri Jun 14, 2019 8:16 am
I have created a subdomain test.mydomian.com but it loads the site from the public_html of mydomain.com.

DNS in managed externally by namecheap so I created a CNAME record there, host = test, value = mydomain.com, added the subdomain in vestacp under WEB then add web domain, did I miss anything?

Thanks all
For subdomain test.mydomian.com you need yo add A record not CNAME.
Something like

Code: Select all

www    IN CNAME   mydomian.com
mail     IN CNAME  mydomian.com
test.mydomian.com IN A       192.168.2.6
Top


Post Reply
  • Print view

3 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