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

New subdomain and its directory

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
konradmm
Posts: 4
Joined: Mon Aug 20, 2018 10:47 pm

Os: Ubuntu 15x
Web: apache + nginx
New subdomain and its directory
  • Quote

Post by konradmm » Mon Aug 20, 2018 10:55 pm

Basically title is pretty simple, yet my problem is kinda bigger.

First of all, few words about my current setup.
I got domain on OVH, lets say EXAMPLE.com. I use personalized DNS Servers pointing as follows:
ns1.EXAMPLE.COM and ns2.EXAMPLE.COM to IP Address of my VPS.

on my VPS there is bind9 server with kinda properly configured dns server (i believe so).

Created a domain with DNS Support: EXAMPLE.COM and it auto-created a directory: "/home/admin/web/EXAMPLE.COM/public_html/".
Whenever i go into my domain address - EXAMPLE.COM, i see properly contents of /public_html/
Now the trickier part.

Im creating the subdomain, lets say: TEST.EXAMPLE.COM, and similar from the example above, it creates the directory "/home/admin/web/TEST.EXAMPLE.COM/public_html/".
However 2 things that bothers me here:

1. When i use "http://test.example.com" in web browser, it returns me an error: "This webpage is unavailable. Ip couldnt be find, blah blah check ur dns servers etc."
2. When i use "http://www.test.example.com" in web browser, it actually shows me the site, however it shows the site from directory: "/home/admin/web/EXAMPLE.COM/public_html/".

It created the subdomain folder in /home/admin/web/, however its not using this directory, but the one for domain EXAMPLE.COM.

So basically 2 questions. What do i need to change to make my subdomains work WITHOUT "WWW" + Why it shows site from main domain, instead of subdomain.

Thanks in advance. Kinda bothering a lot with it.
(Still a bit newbie in all that dns'y stuff, yet in 2nd post will provide screenshots of my current configuration)
Top

konradmm
Posts: 4
Joined: Mon Aug 20, 2018 10:47 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: New subdomain and its directory
  • Quote

Post by konradmm » Mon Aug 20, 2018 11:00 pm

Image

Aint sure if there is anything else needed for configuration, so if anything comes to ur mind, ill provide more data.
Top

konradmm
Posts: 4
Joined: Mon Aug 20, 2018 10:47 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: New subdomain and its directory
  • Quote

Post by konradmm » Tue Aug 21, 2018 9:57 am

I wish i said "found solution", but apparently, it just started working. Was trying a bit more with DNS Records, adding weird stuff like "@ A 123.123.123.123", removed website, added again, and it works. No idea what fixed my issue, but prefer not risking bricking it again.
Top

konradmm
Posts: 4
Joined: Mon Aug 20, 2018 10:47 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: New subdomain and its directory
  • Quote

Post by konradmm » Tue Aug 21, 2018 5:49 pm

Aaaand it stopped working again. I gont get it at all xD
Top


Post Reply
  • Print view

4 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
 

 

cron

Login  •  Register

I forgot my password