DNS Question / issue

carbon

Verified User
Joined
Jun 20, 2011
Messages
5
Hi, I have a domain set up (lets call it mysite.com) in DirectAdmin and I want it's home directory to answer to site.mysite.com (this is for testing before the new site goes live)
I have added "site" as the Name, A record as the type and the ip address of the server as the Value using the DNS administration after selecting mysite.com from the list of domains. All the other domain records for this domain were there.
I have updated the domain name (site.mysite.com) "A" record to point to the server using the domain registrars admin interface and this has propagated/resolved to this new address. Currently mysite.com and www.mysite.com point to a different server, we are putting a new site on the server I have pointed site.mysite.com to.
The home directory serves the standard setup html page ok if I use http://123.45.67.123/~mysite.com (example ip address used) but if I go to http://site.mysite.com the page displays "Apache is functioning normally " not the standard setup html page.
I have Reloaded and Restarted httpd.
Any help appreciated.
 
the IP/~user work just for main domain of the user.

So, if you have two domain into your directadmin: ex: site.com and my.site.com you must select my.site.com as default and then you will able to see using IP/~username.

Regards
 
Thanks SeLLeRoNe, I do understand how the ip/~user works. I only mentioned to illustrate the the site was set up and working.
I simply want the one domain name to also answer to a domain alias, all from the home/public html directory
mysite.com
www.mysite.com
site.mysite.com

With the set up I first described above I would have thought site.mysite.com would display the home/public html directory. I must be missing something?

I did set up a sub-domain, demo.mysite.com which works perfectly
 
For make what you say you have to manually edit virtualhost for let apache listen for my.domain.com pointing to same directory of domain.com

For example, now that you have subdomain my.domain.com you should edit related httpd.conf in /usr/local/directadmin/data/Users/YOURUSER/httpd.conf and edit the document root of my.domain.com to point to same docroot of domain.com

Regards
 
Thanks SeLLeRoNe.

In DirectAdmin, (when logged in as Admin) under Extra Features I went to Custom HTTPD Configurations. Selected the domain I wanted to edit.
Then added - ServerAlias site.mysite.com

This worked perfectly.
Cheers
 
Back
Top